Deprecated: mysql_connect(): The mysql extension is deprecated and will be removed in the future: use mysqli or PDO instead in /home/myscript/public_html/codes-snippets/config.php on line 6
Jquery Image Animation - Jquery

Jquery Image Animation - Jquery

image animation

Snippet Code

Rate this page :
  [ 0 votes]

This animates the image by extending and reducing the width.

<html> <head> <script type="text/javascript" src="jquery-1.2.6.min.js"></script> <script type="text/javascript"> function change(img) { $(img).animate( {width:" =150px"}, 500 ); } function fetch(img) { $(img).animate( {width:"-=150px"}, 500 ); } </script> </head> <body> <div id="test" style="width:600px; height:600px;"> <img src="cat1.jpg" onmouseover="change(this)" id=imgch onmouseout="fetch(this)" style="width:400px; height:400px;"> </div> </body> </html>


Ask Questions

Ask Question