Javascript 图片库无法正常工作
我在创建的 WordPress 网站中使用了名为 prettyPhoto.js
的图片库引擎。 然而,由于某种奇怪的原因,图像库似乎完全停止工作,我一生都无法找到如何纠正这个问题(没有明确地浏览整个网站并删除 rel=" Prettyphoto"
标签嵌入在所有图像锚链接中。
我想知道 javascript 或 CSS 是否没有正确输出到浏览器,但看看 firebug 中的“Net”面板,似乎是我尝试查看引用要打开的图像的 链接,它们都具有所需的“prettyPhoto”属性。
有问题的页面是 <。 a href="http://instant-wine-cellar.co.uk/products/microcellar/" rel="nofollow noreferrer"> http://instant-wine-cellar.co.uk/products/ Microcellar 并尝试单击任何一个 Microcellar 图片。
另一个是首页上的“观看微蜂窝视频”链接。
对于那些不知道的人。 这个图片库脚本与许多其他脚本一样,由以下人员工作:
1. 将 PrettyPhoto javascript 文件放入您的服务器中。
2. 将 PrettyPhoto CSS 文件放入您的服务器中。
3. 将上述文件的路径引用到 html 文件的页眉(或页脚)中。
4. 通过将一些定制脚本放入 HTML 文件中来触发该过程,以查找文件中具有特定 rel
属性的 标记,并打开它引用的链接,进入 PrettyPhoto 模态框。
I used a image gallery engine called prettyPhoto.js
in a WordPress site that I was creating. However, for some strange reason the image gallery seems to have completely stopped working and I can't for the life of me find out how to rectify this problem (without explicitly going through the entire site and stripping out the rel="prettyphoto"
tags embedded in all the image anchor links.
I am wondering if the javascript or the CSS is not being output to the browser properly, but taking a look at the "Net" panel in firebug, it seems to be loading these files without a problem. I tried having a look at the <a>
link referencing the images to be opened, and they all had the required "prettyPhoto" attribute.
The page in question is
http://instant-wine-cellar.co.uk/products/microcellar and try clicking on any of the microcellar pictures.
Another is the "Watch Microcellar Video" link on the front page.
For those who do not know. This image gallery script, same with a lot of others, works by:
1. putting the prettyPhoto javascript file in your server.
2. putting the prettyPhoto css file in your server.
3. referencing the path to the above files into the head (or footer) of your html file.
4. triggering the process by putting some bespoke script into your HTML file to find the <a>
tags in your file with a certain rel
attribute and opening the link it references, into the prettyPhoto modal box.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
首先包含 jquery.js 然后是插件。
查找:
替换:
At first include jquery.js then plugin.
Find:
Replace: