tags:

views:

65

answers:

2

Hi All

I'm using this script on my site - http://www.suuronen.org/esa-matti/projects/panfullsize/

Got it all working fine, only problem is that it always defaults to the zoomed image when you load a page. I'd rather it showed the scaled down image first, and then zoomed when requested.

Anyone know how I can fix it?

Cheers

Sam

+1  A: 

try calling this function after everything

$('#yourpan').normalView();
Funky Dude
+1  A: 

Just don't call the panFullSize until you need to pan.

$(document).ready( function() {

    var $pic = $("img#mypic");

    $("a#zoom").toggle(function(){
            $pic.panFullSize(700, 450);.
        },
        function(){
            $pic.normalView();
        }
    );

});

Or you can use the new callback parameter:

$pic.panFullSize(700, 450, function(){
    $pic.normalView();  
});.
Epeli