Search code examples
jqueryzooming

Is it possible to zoom in and out on the contents of a div?


I'm trying to make a system similar to that of google maps with panning and zooming with the contents of a div. This div will have different buttons, links and images. I just can't find a way to do it without using a canvas. Any ideas on how this could be done?


Solution

  • you can do this by Zoomooz.js

    Simply add "zoomTarget" to the element you want to zoom to when clicked on:

       <div class=""zoomTarget">This element zooms when clicked on.</div> 
    

    You can also add some additional attributes for tuning the animation as data fields of the element:

     <div class="zoomTarget" data-targetsize=lass="0.45" data-duration="600">This element zooms when clicked on.</div> 
    

    from the source Zoomooz.js