When I bind a
$(document).on("click", '.dw-sel', function(e) { opens modal box });
on click, it fires each time, even when there is a drag. I want to get the click function called, only when there is a click without any draging of the wheel. Is there any of such event provided already? Or how to achieve differenciating click from drag?
EDIT:
ok, found a solution line 929 in mobiscroll.core.js
if (!dist && !moved) { // this is a "tap"
istap = true;
tindex = Math.floor((stop - ttop) / h);
var li = $('.dw-li', target).eq(tindex)
li.addClass('dw-hl'); // Highlight
setTimeout(function() {
li.removeClass('dw-hl');
}, 200);
} else {
tindex = Math.round(pos - dist / h);
istap = false;
}
I set the variable istap, and on that I based my click event.