在Backbone.js的移动手势 [英] Mobile gestures in backbone.js

查看:114
本文介绍了在Backbone.js的移动手势的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我可以移动的手势像轻扫,轻点,捏等在Backbone.js的观看赛事?为了更具体以下是我的code。

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?

推荐答案

骨干的依靠jQuery.bind 管理DOM事件。

Backbone relies on jQuery.bind to manage the DOM events.

所以,问题是,如果jQuery的支持这些活动,看起来像 jQuery Mobile的确实,现在你必须检查<一个href=\"http://stackoverflow.com/questions/5537993/how-to-use-jquery-mobile-and-backbone-js-together-in-one-app\">how到jQuery Mobile的骨干整合。

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屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆