Activate/Initialize

Buy now  £29 Get support

Use the click-to-activate option to show zoom on click instead of hover.

Use the click-to-deactivate option to hide zoom on click.

Set the initialize-on option to 'click' to download the image upon click (reduces bandwidth usage, but slows the user experience).

Use the initialize-on option to 'mouseover' to download the image upon first mouseover (also to reduce bandwidth).

Here's the code:

  1. <html>
  2.     <head>
  3.         <title>Magic Zoom: Activate/Initialize</title>
  4.        
  5.         <!-- link to magiczoom.css file -->
  6.         <link href="magiczoom/magiczoom.css" rel="stylesheet" type="text/css" media="screen"/>
  7.         <!-- link to magiczoom.js file -->
  8.         <script src="magiczoom/magiczoom.js" type="text/javascript"></script>
  9.        
  10.     </head>
  11.     <body>
  12.        
  13.         <p>Use the click-to-activate option to show zoom on click instead of hover.</p>
  14.  
  15.         <!-- define Magic Zoom with click-to-active option -->
  16.         <a href="images/r1-blue-3.jpg" class="MagicZoom" rel="click-to-activate: true"><img src="images/r1-blue-2.jpg"/></a>
  17.  
  18.         <p>Use the click-to-deactivate option to hide zoom on click.</p>
  19.  
  20.         <!-- define Magic Zoom with click-to-deactive option -->
  21.         <a href="images/r1-blue-3.jpg" class="MagicZoom" rel="click-to-deactivate: true"><img src="images/r1-blue-2.jpg"/></a>
  22.  
  23.         <p>Set the initialize-on option to 'click' to download the image upon click (reduces bandwidth usage, but slows the user experience).</p>
  24.  
  25.         <!-- define Magic Zoom with the initialization on click -->
  26.         <a href="images/r1-red-3.jpg" class="MagicZoom" rel="initialize-on: click"><img src="images/r1-red-2.jpg"/></a>
  27.  
  28.         <p>Use the initialize-on option to 'mouseover' to download the image upon first mouseover (also to reduce bandwidth).</p>
  29.         <!-- define Magic Zoom with the initialization on mouse over -->
  30.         <a href="images/r1-black-3.jpg" class="MagicZoom" rel="initialize-on: mouseover"><img src="images/r1-black-2.jpg"/></a>
  31.        
  32.     </body>
  33. </html>