jquery mobile方法使用
来源:互联网 发布:网络诈骗如何处理 编辑:程序博客网 时间:2024/04/30 19:15
1、翻屏
jquery mobile支持方法--
自动触发:
$(window).bind('orientationchange',function(e){
console.log(e.orientation); //输出portrait或者landscape
//翻屏执行代码,如改变CSS样式
});
手动触发:
$('button').click(function(){
$(window).trigger('orientationchange');
})
原始方法--
window.addEventListener("orientationchange",orientationChange,true);
function orientationChange(e){
alert(window.orientation); //输出-90 || 0 || 90 || 180
}
2、显示&隐藏
$('div#main').live('pageshow',function(e,ui){
console.log(ui.prePage.selector); //获得页面id
})
$('div#main').live('pagehide',function(e,ui){
console.log(ui.nextPage.selector)
})
- jquery mobile方法使用
- jquery mobile方法使用
- jQuery Mobile中jQuery.mobile.changePage方法使用详解
- jQuery Mobile中$.mobile.buttonMarkup方法使用详解
- 使用 jQuery Mobile 与 HTML5 开发 Web App —— 13 jQuery Mobile 方法上
- 使用 jQuery Mobile 与 HTML5 开发 Web App —— 14 jQuery Mobile 方法下
- 使用 jQuery Mobile 与 HTML5 开发 Web App(十四) —— jQuery Mobile 方法上
- 使用 jQuery Mobile 与 HTML5 开发 Web App(十三) —— jQuery Mobile 方法下
- jQuery Mobile使用
- jquery mobile使用心得
- jquery mobile 基本使用
- Jquery Mobile 使用笔记
- jQuery Mobile 使用
- Jquery Mobile 使用问题
- 使用jQuery Mobile 快速开发mobile 网站
- jQuery.mobile使用(一)
- jquery mobile使用小技巧
- jQuery Mobile的简单使用
- 修改mysql密码
- 呜,本科基础知识点总结。[完整了]
- 在 static 控件中如何让文字变成粗体的
- 从MySQL中导出Excel
- ListView动态加载数据模板
- jquery mobile方法使用
- 面板元素和自定义布局行为
- js 教程
- STDMETHODIMP与STDMETHOD
- C++遍历所有IE浏览器,得到里面的所有元素
- 查找有向图中的环
- 详解SPI中的极性CPOL和相位CPHA
- 网络编程:讨论linux下setsockopt (二)
- 《man男人》-linux命令五分钟系列之十五