detectOrientation();
window.onorientationchange = detectOrientation;
function detectOrientation(){
if(typeof window.onorientationchange != 'undefined'){
if ( orientation == 0 ) {
alert("0")
}
else if ( orientation == 90 ) {
alert("90")
}
else if ( orientation == -90 ) {
alert("-90")
}
else if ( orientation == 180 ) {
alert("180")
}
}
}
Be the first to comment
You can use [html][/html], [css][/css], [php][/php] and more to embed the code. Urls are automatically hyperlinked. Line breaks and paragraphs are automatically generated.