【问题标题】:Pretty Photo not working漂亮的照片不起作用
【发布时间】:2017-03-30 21:40:38
【问题描述】:

为什么我的 Pretty Photo 实现没有在此页面的图片库上触发?

$(document).ready(function(){
     $("a[rel^='prettyPhoto']").prettyPhoto();
 });

<a href="gala2016-photos/photo1-large.jpg" rel="prettyPhoto[pp_gal]" title=""><img src="gala2016-photos/photo1-small.jpg" alt="" /></a>
<a href="gala2016-photos/photo2-large.jpg" rel="prettyPhoto[pp_gal]" title=""><img src="gala2016-photos/photo2-small.jpg" alt="" /></a>

【问题讨论】:

  • Uncaught TypeError: Cannot read property 'msie' of undefined at HTMLAnchorElement.$.prettyPhoto.initialize (http://www.christielakekids.com/_includes/javascript/jquery.prettyPhoto.js:57:214) at HTMLAnchorElement.dispatch (http://code.jquery.com/jquery-1.10.2.js:5095:9) at HTMLAnchorElement.elemData.handle (http://code.jquery.com/jquery-1.10.2.js:4766:28)
  • Resource interpreted as Document but transferred with MIME type image/jpeg: "http://www.christielakekids.com/gala2016-photos/photo7-large.jpg".

标签: javascript jquery prettyphoto


【解决方案1】:

库 prettyPhoto 需要 jquery $.browser 但它已被弃用。 https://api.jquery.com/jquery.browser/

尝试更新 prettyPhoto 库

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多