jQuery: How to smooth animated image resizing

Posted by nikibrown on Stack Overflow See other posts from Stack Overflow or by nikibrown
Published on 2010-05-13T14:09:02Z Indexed on 2010/05/13 14:14 UTC
Read the original article Hit count: 225

Filed under:
|
|
|

I'm a jQuery noob - so please excuse the probable basicness of this question.

I'm doing something pretty simple - on hover animate the position and size of an image. When you mouse over the images there are some noticeable 'jaggies' - is there a way to get rid of this? The jquery code is as follows and a live link is here kristechdev.metropoliscreative.com (hover over the icons).

<script type="text/javascript"> 

   $(document).ready(function() {

    $('#zoomNav li img').hoverIntent(

     function() {

      $(this).animate({'margin-top' :'-35px', 'margin-left' :'-10px', 'height' :'95px','width' : '79px' }, 
            'fast');
     }, 

     function() {

      $(this).animate({'margin-top' : '0px', 'margin-left' :'0px', 'height' :'70px','width' : '58px' }, 
            'fast');
    });    
   });



</script>

© Stack Overflow or respective owner

Related posts about jQuery

Related posts about animate