0

according to the documentation, i should be able to zoom inside a container with the zoomooz jquery script.

this is my code:

function zoom()
{
var mydiv = $("#fullpage");
    mydiv.zoomTo({targetsize:1, duration:1000});
}

Body content:

<body onload="zoom();">
<div  class="zoomViewport">
  <div  class="zoomContainer">

    <div id="fullpage" width="2000">some page content</div>

  </div>
</div>

but when it zooms, instead of zooming the fullpage div (making it small enough to fit the page) it zooms everything including the viewport.

why?

sharkyenergy
  • 3,842
  • 10
  • 46
  • 97

1 Answers1

0

If only to solve the above, you could take the javascript out of the equation, and do the following.

    <body>
       <div class="zoomViewport">
          <div class="zoomContainer">

             <div id="fullpage" class="zoomTarget" data-duration="1000" data-targetsize="0.9" width="2000">some page content</div>


          </div>
       </div>

But if you insist on using javascript this works for me:

var settings = {
        targetsize: 0.8,
        scalemode: "both",
        duration: 450,
        easing: "ease-in",
        nativeanimation: true,
        root: $(document.body),
        debug: false,
        animationendcallback: null,
        closeclick: true,
        preservescroll: false
    }
    // Initiate
    $('#fullpage').zoomTo(settings);
Abarth
  • 176
  • 1
  • 11