/* **设备旋转提示 */ /* $(function(){ var bd = $(document.body); window.addEventListener('onorientationchange' in window ? 'orientationchange' : 'resize', _orientationchange, false); function _orientationchange() { scrollTo(0, 1); switch(window.orientation){ case 0: //横屏 bd.addClass("landscape").removeClass("portrait"); init_pageH(); break; case 180: //横屏 bd.addClass("landscape").removeClass("portrait"); init_pageH(); break; case -90: //竖屏 init_pageH(); //bd.addClass("portrait").removeClass("landscape"); if($(".m-video video")[0]!=undefined && $(".m-video video")[0].paused){ alert("请竖屏查看页面,效果更佳"); }else{ alert("请竖屏查看页面,效果更佳"); } break; case 90: //竖屏 init_pageH(); bd.addClass("portrait").removeClass("landscape"); if($(".m-video video")[0].paused) alert("请竖屏查看页面,效果更佳"); break; } } $(window).on('load',_orientationchange); });