×

Welcome to TagMyCode

Please login or create account to add a snippet.
1
0
 
0
Language: Javascript
Posted by: Vincenzo Assenza
Added: Jul 6, 2015 8:34 AM
Modified: Jul 6, 2015 8:40 AM
Views: 8
  1. window.addEventListener("orientationchange", detectOrientationChange);
  2.    
  3. function detectOrientationChange() {
  4.      switch (window.orientation) {
  5.             case -90:
  6.             case 90:
  7.                
  8.                 break;
  9.  
  10.             case 0:
  11.                
  12.                 break;
  13.      }
  14. }