//处理: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);
})
}