Zoom image using JQuery example | How to zoom image using JQuery animate function (or) mouseover and mouseout

Zoom image using JQuery

Here i am showing example for zooming image using jQuery with animate function by using mouseover and mouseout event. Using JQuery we can able to do any magics on webpage. As part of that, this animation is one more magic. In next example i have shown how to move image from location to other location using JQuery animation, mouseover and mouseout funcations. In this example,

Get more Free Download JQuery PDF Books

After mouse over image will be 400 pxs. After mouse out image will be 300 pxs.


        <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js"></script>
        <script type="text/javascript">
            $("document").ready(function () {
                $('#MyImage').mouseover(function () {
                    $(this).animate({ width: "400" }, 'slow');
                    //$('#MyImage').animate({ marginLeft: "+=550px" }, 2000);
                $('#MyImage').mouseout(function () {
                    //$('#MyImage').animate({ marginLeft: "-=550px" }, 2000);
                    $(this).animate({ width: "300" }, 'slow');
<img src="http://3.bp.blogspot.com/-6P-vVYQ1i4E/T6H1OUfsPfI/AAAAAAAAAGI/1x7HswvivVA/s1600/Word(docx)+to+pdf+in+c%23+docx+file.JPG" id="MyImage"/>

Please check JQuery Interview Questions, JQuery Form Validations and JQuery examples.

Share this post :

Post a Comment

Please give your valuable feedback on this post. You can submit any ASP.NET article here. We will post that article in this website by your name.

Support : Ranga Rajesh Kumar
Copyright © 2012. ASP.NET Examples - All Rights Reserved
Site Designed by Ranga Rajesh Kumar