Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
简单的例子:
$('foo').bind('doubletap swiperight', function() {});
所以,我正在努力提高效率。也许我试图变得太高效,但我想做的是将事件绑定到对象 ONCE,然后说“如果 swiperight 这样做。如果双击这样做。”
这可能吗??
我在这里先向您的帮助表示感谢!
亚历克斯
您可以使用以下方法从处理函数中确定事件的类型event.type:
event.type
$('foo').bind('doubletap swiperight', function(e) { if (e.type == "doubletap") { // tap code } else if (e.type == "swiperight") { // swipe code } });
我得到以下信息:
Can't create table 'tempabcd' (errno: 22)
此错误发生在以下查询(简化)运行数千次后
DROP TABLE IF EXISTS tempabcd; CREATE TEMPORARY TABLE tempabcd (id int(11) NOT NULL, PRIMARY KEY (i