Skip to content

Latest commit

 

History

History
31 lines (24 loc) · 684 Bytes

README.md

File metadata and controls

31 lines (24 loc) · 684 Bytes

my_zoom

JS to make zoom with jquery 1.7.2

Improve this script with modular programing JS

How to Use

The library provides public api's for easy to use.

<script src="rjszoom.js"></script>
<script>
	//First Callout the rjsZoom
	var myZoom = rjsZoom('#parentEl', '#imgContainer', '#image');
	//Init myZoom
	myZoom.init();

	//Add some code here may be listing to button click event
	//for zoom in or zoom out
	myZoom.increaseZoom();
	myZoom.decreaseZoom();
	//Reset the zoom to default
	myZoom.resetZoom();
	//Add listner for resize event on window and then re init the zoom
	window.addEventListener("resize", function(){
			myZoom.initZoom();
	});
</script>