有人可以让我知道手机间隙中 jquery mobile 方向改变事件的正确代码吗?我在哪里以及如何实现这个orientationChange函数?
$(window).bind('orientationchange', _orientationHandler);
然后在_orientationHandler
函数,有类似的东西:
if(event.orientation){
if(event.orientation == 'portrait'){
//do something
}
else if(event.orientation == 'landscape') {
//do something
}
}
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)