Created
May 23, 2015 06:58
-
-
Save imEhllBdPGMVaArZ/a8006c0de9d78525c245 to your computer and use it in GitHub Desktop.
做地用页面的时候需要用到的通用js,慢慢积累- -
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// 横竖屏 | |
(function() { | |
orientationHandle(); | |
}()); | |
function orientationHandle() { | |
if(window.orientation === 0) { // 竖屏 | |
} else { // 横屏 | |
} | |
}; | |
window.onorientationchange = orientationHandle; | |
// 禁止iOS回弹效果 | |
document.addEventListener("touchmove", function(e){ | |
e.preventDefault(); | |
}, true); | |
// loader |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment