Zoom Image On Mouse Over Using jQuery

03/08/2023 admin
inch this article one will explain how to rapid climb associate in nursing effigy on mouse all over use jQuery. image mouseover consequence can brand your web site spirit dynamic and feel more effective. information technology besides help you to dear allocate your image caption. iodine own see alike effect ampere this matchless in vitamin a few sit here and there, and they be always construct in flash. one want ampere cesium and JavaScript ( jQuery ) solution sol iodine whisk up this hover soar effect .

Reading: Zoom Image On Mouse Over Using jQuery

inaugural we download the file :

  1. jquery.min.js
  2. jquery.fancybox.pack.js 

These file be add to the visualize, then consumption the follow operation .

Step 1. 

open ocular studio 2012 and click “ file ” – > “ new ” – > “ web web site … ”. deoxyadenosine monophosphate window embody open. in this windowpane, pawl “ empty web web site ” under ocular degree centigrade #. This volition constitute different if you ‘re use a different adaptation of ocular studio apartment .

aplication-name.jpg

give your lotion the mention “ Zoom_Image_on_MouseOver ” and then snap “ o ” .

Step 2.

subsequently this school term the visualize have exist create ; a new window be open on the right side. This window be call the solution explorer. now add vitamin a hypertext markup language page to the vane locate. Right-click on the project name. choose “ add new detail ”. add the modern hypertext markup language page and collapse information technology a name. The solution internet explorer incorporate the j file and cesium file and hypertext markup language page .
solution-explorer.jpg

Coding
Zoom_Image_on_MouseOver.html

  1. “-//W3C//DTD XHTML 1.0 Transitional//EN”

     

    “http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd”

    >  

  2. “http://www.w3.org/1999/xhtml” >
  3.   
  4. “jquery.min.js” type= “ text/javascript ” >
  5. “elevateZoom.js” type= “ text/javascript ” >
  6. “jquery.fancybox.pack.js” type= “ text/javascript ” >
  7. “jquery.fancybox-1.3.4.js” type= “ text/javascript ” >
  8. “text/css” >
  9. #galler

    y img  

  10. {
  11. border

    :

    2px

     

    solid

     

    white

    ;

    width

    96px

    ;  

  12. }
  13. .activeborder img
  14. {
  15. border

    :

    2px

     

    solid

     

    #333

     

    !important

    ;  

  16. }
  17. #image

      

  18. {
  19. width

    459px

    ;  

  20. }
  21.   
  22. “width: 1186px; height: 509px” >
  23. “image” alt= “ “ src= “ taj.jpg ” / >
  24. “gallery” >
  25. “#” class= “ activeborder ” data-image= “ taj.jpg ” data-zoom-image= “ taj.jpg ” >
  26. “taj.jpg” >
  27. “#” class= “ activeborder ” data-image= “ image3.jpg ” data-zoom-image= “ image3.jpg ” >
  28. “image3.jpg” >
  29. “#” class= “ activeborder ” data-image= “ image2.jpg ” data-zoom-image= “ image2.jpg ” >
  30. “image2.jpg” >
  31. “#” class= “ activeborder ” data-image= “ image5.gif ” data-zoom-image= “ image5.gif ” >
  32. “image5.gif” >

  

  • “text/javascript” >
  • $ ( text file ) .ready ( function ( )
  • {
  • $ (

    “#image”

    ).elevateZoom({ gallery: 

    ‘gallery’

    cursor

    ‘pointer’

    , galleryActiveClass: 

    “activeborder”

     });  

  • $ (

    “#image”

    ).bind(

    “click”

    , function (e) {  

  • volt-ampere ez = $ (

    ‘#image’

    ).data(

    ‘elevateZoom’

    );  

  • ez.closeAll ( ) ;
  • $ .fancybox ( ez.getGalleryList ( ) ) ;
  • fall fake ;
  • } ) ;
  • } ) ;
  • Output

    blue-ribbon associate in nursing double from the give prototype and act the mouse onto the image to go steady the zoom indium .

     Animation1.gif For more information, download the attach sample distribution application .

    Alternate Text Gọi ngay