javascript - Hooking into browser rotation -
i'd execute javascript
code when mobile phone rotated. i'm using jquery
. there custom hook can use mobile browsers?
one way can think of hooking change of viewport size, , checking if height/width ratio has changed. there api method use instead?
it should "onorientationchange" event attached on <body> tag.
looking @ window.orientation property should angle in degrees.
Comments
Post a Comment