在这里检查一些 JQM API...(尚未测试)
http://api.jquerymobile.com/orientationchange/
方向改变时机
尽管当前的实现将为您提供从 window.orientation 派生的 event.orientation 的正确值,但与客户端高度和宽度更改相关的orientationchange 事件的计时在浏览器之间有所不同。这意味着,如果您的绑定依赖于高度和宽度值,您可能需要使用 $.mobile.orientationChangeEnabled = false 完全禁用orientationChange,以让后备调整大小代码触发您的绑定。
http://jquerymobile.com/demos/1.2.0/docs/api/globalconfig.html
您可以通过使用 jQuery 的 $.extend 方法扩展 $.mobile 对象来覆盖默认设置。
$(document).bind("mobileinit", function(){
$.extend( $.mobile , {
foo: bar
});
});
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
1097 次 |
| 最近记录: |