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.
相关文章
|
3月前
|
Web App开发 Rust 前端开发
【一起学Rust | 框架篇 | Tauri2.0框架】Tauri App开启远程调试功能
【一起学Rust | 框架篇 | Tauri2.0框架】Tauri App开启远程调试功能
199 0
|
5月前
|
小程序 开发工具 Android开发
Donut多端框架小程序打包适配ios和安卓app
腾讯新出了一个 Donut 多端框架,可以直接将微信小程序转成 ios 和 安卓 app,小程序开发者工具里也集成了 app 相关升级、调试和打包的功能,终于可以一套代码开发出3个客户端了!
124 0
Donut多端框架小程序打包适配ios和安卓app
|
7月前
|
JSON 前端开发 数据库
如何创建自己的 Mini MVC 框架(如何无框架写个 Web App)
如何创建自己的 Mini MVC 框架(如何无框架写个 Web App)
|
7月前
|
数据库 Ruby
如何不用框架用 Ruby 写 Web APP?
如何不用框架用 Ruby 写 Web APP?
|
8月前
|
测试技术 Python
老板叫我写个APP自动化--Yaml文件读取--内附整个框架源码
老板叫我写个APP自动化--Yaml文件读取--内附整个框架源码
92 0
|
数据可视化 IDE Java
Flutter框架在项目中使用App Manifest检查用户界面以及配置混乱之后对于构建配置的方案【Flutter】
Flutter框架在项目中使用App Manifest检查用户界面以及配置混乱之后对于构建配置的方案【Flutter】
|
前端开发 JavaScript 编译器
【Svelte框架】Svelte在构建快速Web应用程序过程中对于嵌套组件和preventDefault【一个APP的实例】
【Svelte框架】Svelte在构建快速Web应用程序过程中对于嵌套组件和preventDefault【一个APP的实例】
【Svelte框架】Svelte在构建快速Web应用程序过程中对于嵌套组件和preventDefault【一个APP的实例】
uiu
|
敏捷开发 移动开发 小程序
推荐个国产框架,从此轻松开发 小程序/App/h5
推荐个国产框架,从此轻松开发 小程序/App/h5
uiu
275 1
推荐个国产框架,从此轻松开发 小程序/App/h5
|
XML API Android开发
Android 天气APP(四)搭建MVP框架与使用
Android 天气APP(四)搭建MVP框架与使用
250 0
Android 天气APP(四)搭建MVP框架与使用
|
监控 Java 测试技术
APP自动化测试框架-UiAutomator2基础
UiAutomator2是一款强大的Android自动化测试框架
APP自动化测试框架-UiAutomator2基础

热门文章

最新文章