我正在尝试在我的页面上实现 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>