我正在尝试在我的页面上实现jQuery插件prettyPhoto。我使用了这个页面中的例子:
http://www.no-margin-for-errors.com/projects/prettyphoto-jquery-lightbox-clone/#!prettyPhoto
当我使用rel="prettyPhoto[pp_gal]"时,会收到关于错误语法的错误消息:
错误:语法错误,无法识别的表达式:
[rel*=[pp_gal]
有什么问题吗?
我已经在我的项目中安装了prettyPhoto jQuery插件。我已经把这个脚本放在页面上了:
$(document).ready(function () {
$("a[rel^='prettyPhoto']").prettyPhoto();
});为了查看图像,我使用了这个HTML,路径是localhost,因为我现在只想让它正常工作:
<a href="../GalleryImages/ScreenClip[1].png" rel="prettyPhoto[pp_gal]"><img src="../GalleryImages/ScreenClip[1].png" width="60px" height="60px" alt="Nice building" /></a>
<a href="../GalleryImages/1.jpg" rel="prettyPhoto[pp_gal]"><img src="../GalleryImages/1.jpg" width="60px" height="60px" alt="Nice building" /></a>发布于 2012-02-03 16:22:13
该错误似乎与PrettyPhoto 2.5.x和jQuery 1.3.2有关--该版本的漂亮伤寒不适用于较新版本的jQuery。
因此,如果希望prettyPhoto 2.5.x工作,就必须使用jQuery 1.3.2。
https://stackoverflow.com/questions/9091931
复制相似问题