I'm using fancybox 3. I need to turn off swiping fancybox slides by mousemove. I would like to leave only control buttons next\prev. How can I do that? Thanks.
I'm using fancybox 3. I need to turn off swiping fancybox slides by mousemove. I would like to leave only control buttons next\prev. How can I do that? Thanks.
Share Improve this question asked Aug 7, 2017 at 18:02 Dmitry B.Dmitry B. 4261 gold badge4 silver badges11 bronze badges3 Answers
Reset to default 13So, the full answer will be:
Using data-options attribute
<a data-options='{"touch" : false}' data-fancybox data-src="#myElement" href="javascript:;">Click me</a>
Or when initializing fancybox
$('selector').fancybox({
touch: false
});
From @Janis answer here: https://github.com/fancyapps/fancybox/issues/1277
Simply set touch:false
to disable touch events.
The previous answer did not work for me on Fancybox 3.5.*. I had to move the touch option to inside the opts object, like as follows:
$.fancybox.open({
src: yoursource,
opts: {
touch: false
}
});