jQuery plugin: panView

Creates a pan view, hold down your mouse button and start moving.

Syntax

$(element).panView(Width, Height)

Parameters

Width	Required. Integer or String 'auto' that specifies the width of the pan view window.
Height	Required. Integer or String 'auto' that specifies the height of the pan view window.

Return Value

none

Remarks

The image that is loaded is about 100kb, but Mr T is worth waiting for.

Only tested in FF > 1.x, Opera 8.54, IE 6.x.

Download

Download jquery-plugin-panview.js (3kb uncompressed)

Examples

<img src="mr-t.jpg" id="imagePan" style="display:none;"/>
<script>
$(document).load(function() {
	$("img#imagePan").panView(400,400);
}
</script>
<img src="mr-t.jpg" id="imagePan2" style="display:none;"/>
<script>
$(document).load(function() {
	$("img#imagePan2").panView('auto',400);
}
</script>