2 Replies Latest reply on Dec 14, 2015 2:07 PM by speedm54138797

    Orientation changes (Landscape, portrait)?

    speedm54138797

      Hi there!.... This is the situation, i want to detect the orientation of the device....if is in landscape, do something and if is in portrait, do something different... i've just import the jquery mobile libraries and i've created a test-project.

       

      I inserted this code in the compositionReady event

       

      $( window ).on( "orientationchange", function( event ) {
      alert( "This device is in " + event.orientation + " mode!" );

       

      });

       

       

      it works, but I want to apply a conditional when the orientation changes to do something.

      Please help! !