backbone.js中的移动手势 [英] Mobile gestures in backbone.js
本文介绍了backbone.js中的移动手势的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我可以在Backbone.js View事件中进行移动手势,例如滑动,点按,捏等吗?以下是我的代码。
Can I have mobile gestures like swipe, tap, pinch etc in the Backbone.js View events? To be more specific following is my code.
Backbone.View.extend({
initialize:function(){
//initialization
},
Events:{
"swipe-left #homeBtn":"homeSwipe"
},
homeSwipe:function(){
alert("Event Swipe left triggered!");
}
});
我可以让手机像滑动,滑动左/右,捏,点按等工作使用backbone.js?
Can I have the mobile gestures like swipe, swipe-left/right, pinch, tap etc to work with backbone.js?
推荐答案
Backbone 依赖于jQuery.bind 来管理DOM事件。
Backbone relies on jQuery.bind to manage the DOM events.
所以问题是如果jQuery支持这些事件,并且看起来像 jQuery Mobile ,现在您必须检查如何整合jQuery Mobile和Backbone 。
So the question is that if jQuery supports these events and looks like jQuery Mobile does, now you have to check how to integrate jQuery Mobile and Backbone.
这篇关于backbone.js中的移动手势的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文