PhotoSwipe手机端图片弹出显示插件【使用笔记】
官网:https://photoswipe.com/
代码下载地址:
http://down.51cto.com/data/2303672
在移动端开发时使用photoswipe插件报错 Uncaught TypeError: Cannot read property 'x' of undefined
解决办法:https://www.cnblogs.com/zxlshare/p/6472418.html
//处理:photoswipe插件报错 Uncaught TypeError: Cannot read property 'x' of undefined function setpic() { $(".demo-gallery img").each(function () { var imgs = new Image(); imgs.src = $(this).attr("src"); var w = imgs.width * 10, h = imgs.height * 10; $(this).parent("a").attr("data-size", "").attr("data-size", w + "x" + h); }) }
声明:本站所有文章资源内容,如无特殊说明或标注,均为采集网络资源。如若本站内容侵犯了原著者的合法权益,可联系本站删除。