Open ccarv opened 10 years ago
I'm experiencing the same issue. Its not working on touch enabled devices. I think it should be a priority since almost everyone is using touch enabled devices.
Same problem here. Tested on Google nexus 10 tablet.
I encountered the same issue (dragging is not working on mobile devices). After some minor updates to the code I came up with a working solution. Just add the following to the source's SimpleSlider class (function):
// Zacky: mobile support
this.dragger.bind('touchstart', function(e) {
_this.dragging = true;
_this.dragger.addClass("dragging");
_this.domDrag(e.originalEvent.touches[0].pageX, e.originalEvent.touches[0].pageY);
return false;
});
$("body").bind('touchmove', function(e) {
if (_this.dragging) {
_this.domDrag(e.originalEvent.touches[0].pageX, e.originalEvent.touches[0].pageY);
return false;
}
}).bind('touchend', function(e) {
if (_this.dragging) {
_this.dragging = false;
_this.dragger.removeClass("dragging");
return $("body").css({
cursor: "auto"
});
}
});
Same problem here. @zackyp's solution works like a charm.
@zackyp this should really go into master branch
Same problem here. @zackyp's solution works like a charm.
Tested on Android KitKat 4.4.2:
Fails to detect click and drag. More than likely due to native navigation functionality on touch enabled devices.
--edit
Just noticed a touch-support branch but unfortunately I still wasn't able to get it working. It recognizes that the device I am using is a touch-enabled device, except dragging is still failing. Not only that but it appears the click (click anywhere on the slider except on the drag button) event is no longer firing either.