jQuery plugin - Pan full size images
The plugin - jquery.panFullSize.js
- Returns a inline-block "pan" div-element with the image as background.
- Syntax: $("img").panFullSize(width, height);
- Width and height are the dimensions of pan-div.
- If not set, values will be taken from the img-element or, if already exists, from the pan-div.
- Normal image view can be restored with normalView().
- Throws an exception if tried to apply with other than img-element or the created pan-div.
- Tested with Firefox 3.0, IE7, Safari 3.1, Google Chrome 0.4 and Opera 9.6.
- Contact: esa-matti [a] suuronen [dot] org
- jQuery plugin page
Drag image to pan
Zoom
Finnish winter <3
Example code
<img src="testimage.jpg" width="600" id="mypic" style="border: medium solid black" alt="finnish winter" />
$("img#mypic").panFullSize(700, 450).css("border", "medium solid black");
$("a#zoom").toggle(function(){
$("img#mypic").normalView();
},
function(){
$("img#mypic").panFullSize();
}
);