[-] Fo : Fix big pic alt with jqzoom

This commit is contained in:
gRoussac
2013-04-16 10:22:46 +02:00
parent 00d7d78ba6
commit 6cdf8babca
3 changed files with 7 additions and 5 deletions
+4 -3
View File
@@ -31,9 +31,10 @@
var imageWidth = $(this).get(0).offsetWidth;
var imageHeight = $(this).get(0).offsetHeight;
noalt = $(this).attr("alt");
attr = typeof($(this).attr("rel")) != 'undefined' ? "rel" : "alt";
noalt = $(this).attr(attr);
var bigimage = noalt;
$(this).attr("alt", '');
$(this).attr(attr, '');
if($("div.zoomdiv").get().length == 0)
$(this).after("<div class='zoomdiv'><img class='bigimg' src='"+bigimage+"'/></div>");
@@ -67,7 +68,7 @@
$("div.zoomdiv").get(0).scrollLeft = (scrollx) * scalex ;
});
}, function() {
$(this).attr("alt", noalt);
$(this).attr(attr, noalt);
$("div.zoomdiv").hide();
$(document.body).unbind("mousemove");
$(".lenszoom").remove();