Hello,
I've customized the panview code to accommodate what I want it to do,
but I'm having a problem with it in IE. Firefox works fine.
Panning the image in IE doesn't work and I think it has something to
do with scrollTop, but i have no idea what to do to fix it. If I
take the pan image code out of the html page and have it by itself it
works.
I'd appreciate any help with this! Code and links are below.
Thank you!
Brady
The first thumbnail image is the to test.
With HTML: DOES NOT WORK
http://www.organizedmadness.com/pan/merchant.mvc.htm
Without HTML: WORKS
http://www.organizedmadness.com/pan/...t_mini.mvc.htm
"jQuery.fn.panv iew = function(target ){
num = 0;
return this.each(funct ion(){
new jQuery.panview( this,target);
});
}
jQuery.panview = function(obj,ta rget){
var bigImage = $("#"+target).g et(0);
$("img", obj).mouseover( function(){
MM_swapImage('m yimage','',this .src,
0);
var scaleY =
Math.round(bigI mage.offsetHeig ht/
this.offsetHeig ht);
var scaleX =
Math.round(bigI mage.offsetWidt h/this.offsetWidt h);
$("img", obj).mousemove( function(e){
this.style.curs or =
'pointer';
scrollY = e.pageY -
this.offsetTop - 10;
scrollX = e.pageX -
this.offsetLeft - 20;
bigImage.scroll Top =
scrollY * scaleY;
bigImage.scroll Left =
scrollX * scaleY;
});
});
$("img", obj).mouseout(f unction(){
$("img", obj).unbind("mo usemove");
MM_swapImgResto re();
bigImage.scroll Top=0;
bigImage.scroll Left=0;
});
}