jquery - Prevent click for Chocolat.js while dragging using slick.js -
right have draggable images container using slick , want preview full size when single click happens using chocolat.js,
the problem when release mouse (after dragg), still fires full screen,
i tried destroy chocolat when dragg event begins, persists..
var $chocolat = $('.chocolat').chocolat({ imagesize: 'contain', loop: true }).data('chocolat'); $('#bx-pager_builder').slick({ dots: true, infinite: true, speed: 300, slidestoshow: 1, centermode: true, variablewidth: true, beforechange: function() { $chocolat.api().destroy(); }, afterchange: function() { $chocolat = $('.chocolat').chocolat({ imagesize: 'contain', loop: true }).data('chocolat'); } });
the problem chocolat documentation doesn't provide examples..
any idea if i'm trying posible? ( , how? ^^ )
do have demo somewhere can understand bug ?
anyway page, full of examples, can open in browser :
https://github.com/nicolas-t/chocolat/blob/master/dist/index.html
these lines in particular : https://github.com/nicolas-t/chocolat/blob/master/dist/index.html#l142l240 show how use api
Comments
Post a Comment