# Other Languages > jQuery >  [RESOLVED] how to use this jquery code?

## JJJCR_FOX

$("#myContentRegion").delegate("img", "hover", function(){
    $(this).animate({ 
            width: 200, height: 200 
        }, 5000, function() {
    $(this).animate({ width: 100, height: 100 });
  });

});

found above code on this link: http://stackoverflow.com/questions/3...nerated-images

how do i use it on my html page? please help.. thanks  :Smilie:

----------


## danasegarane

Hw about this one



```


<html>                                                                  
 <head>                                                                  
 <script type="text/javascript" src="http://code.jquery.com/jquery-1.6.2.min.js"></script>          
                                                                
 </head>                                                                 
 <body>                                                                  
    Image over demo  
      <div id="myContentRegion">  
   <img src="http://techreceipe.com/wp-content/uploads/2011/06/InterExpl-Cannot-display-the-page.jpg" height="100" width="100"  alt="Angry face" />   
      </div>
<script>                                         
   $("#myContentRegion").delegate("img", "hover", function(){
    $(this).animate({ 
            width: 200, height: 200 
        }, 5000, function() {
    $(this).animate({ width: 100, height: 100 });
  });

});
                                  
 </script>
 </body>                                                                 
 </html>
```

Demo here

----------


## danasegarane

Another Example



```




<html>                                                                  
 <head>                                                                  
 <script type="text/javascript" src="http://code.jquery.com/jquery-1.6.2.min.js"></script>          
           
<script>
 $(document).ready(function(){
       $('#myimage').width(200);
       $('#myimage').mouseover(function()
       {
          $(this).css("cursor","pointer");
          $(this).animate({width: "500px",height:"500px"}, 'slow');
       });
    
    $('#myimage').mouseout(function()
      {   
          $(this).animate({width: "200px",height:"200px"}, 'slow');
       });
   });
                                                     
</script>
 </head>                                                                 
 <body>                                                                  
    Image over demo  
      <div id="myContentRegion">  
   <img id="myimage" src="http://techreceipe.com/wp-content/uploads/2011/06/InterExpl-Cannot-display-the-page.jpg" height="100" width="100"  alt="Angry face" />   
      </div>


                                  
 </script>
 </body>                                                                 
 </html>
```


Demo here

----------


## JJJCR_FOX

hi danasegarane, thank you so much bro for your help  :Wink:

----------

