Could someone please let me know the right code for orientation change event by jquery mobile in phone gap? Where and how do I implement this orientationChange function?
$(window).bind('orientationchange', _orientationHandler);
then in the _orientationHandler function, have something like:
_orientationHandler
if(event.orientation){ if(event.orientation == 'portrait'){ //do something } else if(event.orientation == 'landscape') { //do something } }