2

https://github.com/timmywil/jquery.panzoom在颜色框中使用了从这个站点提取的 jquery panzoom。缩放选项在颜色框内不起作用。如果我把它放在弹出窗口之外它工作正常。如何解决这个问题?

内部脚本:

<script>
      $("#panzoom").panzoom({
        $zoomIn: $(".zoom-in"),
        $zoomOut: $(".zoom-out"),
        $zoomRange: $(".zoom-range"),
        $reset: $(".reset")
      });
    </script>

html:

<section>
        <div id="panzoom" style="text-align: center">
        <img src="http://blog.millermedeiros.com/wp-content/uploads/2010/04/awesome_tiger.svg" width="300" height="300">
      </div>
    </section>
      <button class="zoom-in">Zoom In</button>
      <button class="zoom-out">Zoom Out</button>
      <input type="range" class="zoom-range">
      <button class="reset">Reset</button>
4

1 回答 1

0

尝试这个

$('selector').colorbox(inline:true,onComplete:function(){
$("#panzoom").panzoom({
        $zoomIn: $(".zoom-in"),
        $zoomOut: $(".zoom-out"),
        $zoomRange: $(".zoom-range"),
        $reset: $(".reset")
      });

}
});
于 2013-08-02T05:47:27.610 回答