Wednesday, 4 September 2013

jQuery touch events not firing

jQuery touch events not firing

ok so I have some JS code thats working perfectly in the desktop browsers
using
$(window).mouseup(function(e) { // ... this executes as expected! };
I want touch events to work in the same way on mobile devices but
$(window).touchend(function(e) { // ... };
doesn't exist as a function (.touchend is not a function) and fails,
crashing my code in the process...
canvas.bind('touchend', function(e) { // ... };
doesn't crash the code, but it doesn't catch the event either :-(
Why is this so retardedly difficult? Whats the simple answer?

No comments:

Post a Comment