App Framework框架之绑定事件(1)

23 篇文章 0 订阅

App Framework是intel公司开发的一个web app框架

官网:http://app-framework-software.intel.com/af22

有如下事件:

tap                  Tap on the element

singleTap            Single tap on the elem (250ms delay after tap is triggered)

doubleTap            Double tap (quick) on the element

longTap              Long press on the element

swipe                The element was swiped (30px threshold)

swipeLeft            The element was swiped left

swipeRight           The element was swiped right

swipeUp              The element was swiped up

swipeDown            The element was swiped down

 

绑定事件

 

$("#element").bind("doubleTap",function(){});

$('#label_toggle_passwd').bind("tap",function(){
    toggleCheckbox(document.getElementById('showpw'));
})

 App Framework UI  基于ZeptoJS*触屏库提供了多种触屏事件  ,以下是你可以注册监听的事件列表

 

tap //类似于普通的 click

singleTap //点一次

doubleTap //连续点两次

longTap //长按

swipe //滑屏

swipeLeft //左滑屏

swipeRight //右滑屏

swipeUp //上滑屏

swipeDown //下滑屏

The swipe event is always triggered with the direction of the swipe. The tap event is always triggered when singleTap, doubleTap or longTap are dispatched.

 

Events

Below are the following events triggered in App Framework UI. 

1
$.ui.load - This event is fired once when
App Framework UI is loaded and ready to go.

These events are only triggered on the window object

1
2
3
hashchange - This event is fired when the a panel has been changed.
orientationchange - This event is fired when the page rotates.
afui:init - This event fires when then $.ui object has been initialized

These events are triggered on the document.

1
2
afui:ready - App Framework UI has launched and ready to be used
missingpanel - This event is fired when the panel was not found in the DOM

These events are triggered on a DOM node. They will bubble up.

1
2
3
4
5
6
7
unloadpanel  - This event is fired when a panel has been unloaded.
loadpanel  - This event is fired when a panel has been loaded.
tap  - This event is fired when tap event happened on a node.  It is similar to a click event.
doubleTap  - This event is firedd when a DOM node is double tapped.
singleTap  - This event is fired when a node is single tapped.  There is a delayed trigger for this event.
longTap  - This event is fired when a user holds down a tapped a node for over 750 milliseconds.
swipe - This event is fired when a user swipes a DOM node.

These events are triggered by a scroller object. These events are handled using $.trigger and $.bind. These events will not bubble.

1
2
3
4
5
6
7
8
9
10
11
12
refresh-release  - This event is fired when a scroller object pull to refresh has been released.
refresh-cancel - This event is fired when a refresh has been triggered, but a user scrolls then we cancel it.
refresh-trigger - This event is fired when a refresh request has happened on the scroller.
refresh-finish - This event is fired when a refresh has been processed and finished.
 
infinite-scroll - This event is fired  when a scroller has hit the end of the content and is requesting more info.
infinite-scroll-end - This event is fired when a scroller has stopped scrolling after triggering an infinit-scroll event.
 
scrollstart - This event is fired when a scroller object starts scrolling.
scrollend - This event is fired when a scroller stops scrolling.
 
swipeLeft/swipeRight/swipeDown/swipeUp - These events are fired in response to a swipe event.  They indicate the direction of the swipe.
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值