我正在使用jquerymobile和phonegap构建的android应用程序。 我正在测试orientationchange以验证jquerymobile相应地使用lanscape或portrait模式管理布局。我不想在orientationchange事件中进行任何自定义操作,我只想让jquerymobile css(媒体设置)为我工作,并重置html5页面上的项目。Orientationchange仅在第一次运行
但是,似乎只有第一次触发orientationchange事件。一看就知道,我创建了这个简单的JS:
$(window).bind('orientationchange', function(e){
navigator.notification.alert(jQuery.event.special.orientationchange.orientation());});
而且我发现,警报消息仅在第一取向变化事件(从纵向到横向)所示。在第一条消息出现之后,没有其他警报出现,所以我认为事件并没有被更多的解雇。 我错过了一些东西,可能是在配置或Android清单?非常感谢你提前。