ПОЖАЛУЙСТА, ОБРАТИТЕ ВНИМАНИЕ! Я ОБНОВИЛ ЭТОТ ВОПРОС С НОВЫМИ ДАННЫМИ И ССЫЛКАМИ
У меня есть этот код на основе этой документации
код работаетздесь: http://jsfiddle.net/mplungjan/7ZBxP/
но не здесь:
Я получаю Error: $(this).data("orgSize") is undefined
на линии width: $(this).data("orgSize").width,
$(".ui-tooltip img.thumb")
.live("mouseenter",function() {
cont_left = $(".ui-tooltip").position().left; // no container until hover
// save this scaled down image size for later
$(this).data("newSize",{width:this.width,height:this.height})
$(this).parent().parent().css("z-index", 1);
$(this).animate({
width: $(this).data("orgSize").width,
height: $(this).data("orgSize").height,
left: "-=50",
top: "-=50"
}, "fast");
})
здесь, где яопределите это:
var imageObject = $('<img/>').load(function(){
var w = this.width;
var h = this.height;
var orgSize = {width:w,height:h};
var imgId = "thumb_"+p_sPubNum;
var actualImage = $('<img/>')
.attr("id",imgId)
.attr("src",sOpsUrl + sImageUrl)
.attr("alt",loadingLabel+': '+p_sPubNum)
.addClass("thumb");
// set EITHER width OR height if either is > 150
if (w<h && w>150) actualImage.attr("width",150);
else if (w>h && h > 150) actualImage.attr("height",150);
$('.qTip2Image').append(actualImage);
// save original size for later
$("#"+imgId).data("orgSize",orgSize);
}).error(function() {
if ((iPos + 1) < aPublicationNumbers.length) {
var sNextNumber = aPublicationNumbers[(iPos + 1)];
getImage(sNextNumber, sDirection);
}
}).attr("src",sOpsUrl + sImageUrl);