jquery mobile 的事件测试
来源:互联网 发布:嵌入式与单片机 编辑:程序博客网 时间:2024/05/17 01:35
一下脚本测试了jquery 以及jquery mobile的事件触发顺序
某次编程的时候,getBoundingClientRect获取element的大小,永远是0,原来是脚本的调用时机放错了位置;一般在ready处调用
<!DOCTYPE html> <html><head><meta charset="utf-8"><title>[!--pagetitle--]</title><link href="http://code.jquery.com/mobile/1.4.0/jquery.mobile-1.4.0.css" rel="stylesheet" type="text/css"/><script src="http://code.jquery.com/jquery-1.10.2.js" type="text/javascript"></script><script>$(document).on("mobileinit", function(){ alert('mobileinit');});</script><script src="http://code.jquery.com/mobile/1.4.0/jquery.mobile-1.4.0.js" type="text/javascript"></script></head> <body class='page-swipe'> <script>alert("script exect");$(document).on('pagebeforechange', function(e, data){ alert('pagebeforechange'); }); $(document).on( "pagebeforecreate", function( event ) { alert('pagebeforecreate'); }); $(document).on("pagecreate", function( event ) { alert('pagecreate');} );$(document).on("pageinit","#page",function(){alert(' page pageinit');});$(document).on('pageinit', function(){ alert('pageinit');});$(document).on('pagebeforeshow', function(){ alert('pagebeforeshow');});$(document).on( "pagecontainershow", function( event, ui ) { alert( "pagecontainershow" );});$("#slider").ready(function(){alert(' slider ready');});$(document).ready(function(){alert('ready');});$(function(){alert('jquery execte ready');});$(window).load(function() {alert('window load');});window.onload=function(){alert('onload');}; $( window ).hashchange(function() { alert('hashchange'); });--></script></body></html>
0 0
- jquery mobile 的事件测试
- jQuery Mobile的API事件
- jQuery Mobile的API事件
- jQuery的Mobile事件处理
- 深入jQuery Mobile的事件
- JQuery Mobile 的4个初始化事件
- jquery mobile 的4个初始化事件
- 继承扩展jQuery Mobile的初始化事件
- jquery mobile 的4个初始化事件
- 【Jquery mobile】事件
- jquery mobile中的事件
- jQuery mobile 事件 swipe
- JQuery Mobile事件详解
- jQuery Mobile 基础事件
- jQuery Mobile 页面事件
- jquery mobile中的事件
- JS-jquery mobile事件
- jQuery Mobile中的事件
- 盒子border的三要素:宽,形状,颜色。
- 分布式版本控制系统Git学习资源收集汇总(附Github个人简历自动生成)
- hdu 1017 A Mathematical Curiosity
- 探索 ConcurrentHashMap 高并发性的实现机制
- Git windows下配置
- jquery mobile 的事件测试
- Java数据库编程---JDBC操作步骤及数据库连接操作
- 地址线和数据线关系
- Linux环境变量配置
- 开发板和虚拟机共享方式
- error:求平方数时,求数的位数时,没考虑仔细flag,漏了一种情况
- udev的介绍
- [Leetcode] Longest Consecutive Sequence (Java)
- linux bash bc awk 浮点 计算 比较