App Framework框架之绑定事件(1)-阿里云开发者社区

开发者社区> 黄威的世界> 正文

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

简介:
+关注继续查看

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

 

绑定事件

 

Js代码  收藏代码
  1. $("#element").bind("doubleTap",function(){});  
  2.   
  3. $('#label_toggle_passwd').bind("tap",function(){  
  4.     toggleCheckbox(document.getElementById('showpw'));  
  5. })  

 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.

版权声明:本文内容由阿里云实名注册用户自发贡献,版权归原作者所有,阿里云开发者社区不拥有其著作权,亦不承担相应法律责任。具体规则请查看《阿里云开发者社区用户服务协议》和《阿里云开发者社区知识产权保护指引》。如果您发现本社区中有涉嫌抄袭的内容,填写侵权投诉表单进行举报,一经查实,本社区将立刻删除涉嫌侵权内容。

相关文章
利用 Chrome 开发者工具自带的 Memory 工具分析 Node.js 应用的内存分配情况
利用 Chrome 开发者工具自带的 Memory 工具分析 Node.js 应用的内存分配情况
4 0
内容分发网络 CDN 是如何提高网页加载时间的?
内容分发网络 CDN 是如何提高网页加载时间的?
5 0
Chrome 开发者工具 版本 65 新引入的 Overrides
Chrome 开发者工具 版本 65 新引入的 Overrides
6 0
Service Worker 的一个实战例子
Service Worker 的一个实战例子
6 0
Service Worker 概念简介
Service Worker 概念简介
6 0
关于前端开发 Framework Agnostic 和微前端的话题
关于前端开发 Framework Agnostic 和微前端的话题
6 0
内容分发网络 - Content Delivery Network 学习笔记
内容分发网络 - Content Delivery Network 学习笔记
5 0
什么是 CDN 边缘服务器 - Edge Server
什么是 CDN 边缘服务器 - Edge Server
7 0
Chrome 90 里更好的字符串处理机制
Chrome 90 里更好的字符串处理机制
5 0
+关注
黄威的世界
我是一个热衷IT技术的人,希望自己不断地设计开发出对别人非常有用的软件。有近7年的java开发经验(包括2年Android开发经验)和一年左右的linux使用经验。擅长Java Web后台开发 ,喜欢研究新的各种实用技术
668
文章
0
问答
文章排行榜
最热
最新
相关电子书
更多
文娱运维技术
立即下载
《SaaS模式云原生数据仓库应用场景实践》
立即下载
《看见新力量:二》电子书
立即下载