我想在我的页面上实现jQuery插件prettyPhoto。我从这个页面使用的示例:jQuery prettyPhoto问题
http://www.no-margin-for-errors.com/projects/prettyphoto-jquery-lightbox-clone/#!prettyPhoto
当我使用rel="prettyPhoto[pp_gal]"
我得到错误的语法错误消息:
Error: Syntax error, unrecognized expression:
[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>
**没有看到任何代码,任何人都可能能够协助**请参阅:http://tinyurl.com/so-hints – Sparky 2012-02-01 06:53:49
现在更清楚了吗? – 2012-02-01 07:08:02
国际海事组织,错误是,如果你没有正确包括jQuery或插件。您是否在prettyPhoto插件中加入了jQuery _before_?你是在调用'.prettyPhoto()'_after_吗?他们看起来像是明显的问题,但没有人能看到你的代码的一部分。这几乎就像你没有阅读我的第一条评论中的链接。 – Sparky 2012-02-01 07:13:01