var inDoubleTap = false; // Shared across all bound elements
return $list.live('touchstart', function(e) {
if (e.originalEvent.touches.length === 1) {
if (!inDoubleTap) {
inDoubleTap = true;
setTimeout(function() { inDoubleTap = false }, delay);
} else {
inDoubleTap = false;
callback.call(this, e);
exit(0);
}
}
});
The above code shows an error if i use exit(0) in mobile browsers (iphone, ipad)
var inDoubleTap = false; // Shared across all bound elements
return $list.live('touchstart', function(e) {
if (e.originalEvent.touches.length === 1) {
if (!inDoubleTap) {
inDoubleTap = true;
setTimeout(function() { inDoubleTap = false }, delay);
} else {
inDoubleTap = false;
callback.call(this, e);
exit(0);
}
}
});
The above code shows an error if i use exit(0) in mobile browsers (iphone, ipad)
Share Improve this question edited May 19, 2011 at 8:56 Félix Saparelli 8,7496 gold badges55 silver badges68 bronze badges asked May 19, 2011 at 8:49 TarunTarun 132 silver badges9 bronze badges 2- 5 Under no circumstance tell us what error you're getting exactly - it would spoil the fun of guessing! – Pekka Commented May 19, 2011 at 8:51
-
3
What did you expect
exit(0)
to do? Close the browser? Seriously, I'd like to understand your reasoning. – Zecc Commented May 19, 2011 at 8:56
1 Answer
Reset to default 4Surely you mean return;
instead of exit(0)
. That should work.