admin管理员组文章数量:1430078
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.
本文标签: Error while using exit(0) in javascriptStack Overflow
版权声明:本文标题:Error while using exit(0) in javascript - Stack Overflow 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1745501844a2661068.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论