0

I'm using a jquery plugin that allows zooming with mousewheel (i'm using it for mobile, to allow pinch zooming on a pdf) and I used this code

(function() {
    var $section = $('#section');
    var $panzoom = $section.find('.panzoom').panzoom();
    $panzoom.parent().on('mousewheel.focal', function(e) {
        e.preventDefault();
        var delta = e.delta || e.originalEvent.wheelDelta;
        var zoomOut = delta ? delta < 0 : e.originalEvent.deltaY > 0;
        $panzoom.panzoom('zoom', zoomOut, {
            animate: false,
            focal: e
        });
    });
})();

But since I added the zooming on the element, the click event isn't triggered anymore :

 $("#section").click(function(e) {
    //something ...
    }

Are there a way to enable the click and the zooming (on mobile) on the same element?

Kays Kadhi
  • 538
  • 6
  • 21

0 Answers0