I'd like to execute some JavaScript
code when the mobile phone is rotated. I'm using jQuery
. Is there a custom hook I can use with mobile browsers?
One way I can think of is hooking into the change of the viewport size, and checking if the height/width ratio has changed. Is there an API method that I could use instead?