标签:onload tran ati window cas .sh change list listen
window.onload = function(){ //横竖屏 function doOnOrientationChange(){ switch(window.orientation){ case 90: transverse(); break; case -90: transverse(); break; default: vertical(); break; } } window.addEventListener("onorientationchange" in window ? "orientationchange" : "resize", doOnOrientationChange, false); doOnOrientationChange(); function transverse(){ jQuery("#loading").hide(); } function vertical(){ jQuery("#loading").show(); } }
标签:onload tran ati window cas .sh change list listen
原文地址:http://www.cnblogs.com/mbyund/p/6606432.html