jquery - How to zoom in an image on mouse up and zoom out on mouse down? -


i want zoom in image on mouse , zoom out on mouse down. i've tried plugins zoom part of image in new window don't need those. want image zoom-in on own window. please help.

hope below demo helps.

<!doctype html> <html> <body> <div class="normal"> <img id="p1"  src="http://www.hdwallpapersimages.com/wp-content/uploads/2014/01/winter-tiger-wild-cat-images.jpg"     onmousedown="mousedown()" onmouseup="mouseup()" /> </div> <script> function mousedown() { var m=document.getelementbyid("p1"); m.style.width="300px"; m.style.height="400px"; } function mouseup() { var m=document.getelementbyid("p1"); m.style.width="200px"; m.style.height="300px"; } </script> <style> .normal>img {width: 200px; height: 300px;} </style> </body> </html> 

Comments

Popular posts from this blog

php - failed to open stream: HTTP request failed! HTTP/1.0 400 Bad Request -

java - How to filter a backspace keyboard input -

java - Show Soft Keyboard when EditText Appears -