code: function() {
              if (typeof window.orientation == 'undefined') {
  
                  if (pgwBrowser.viewport.width >= pgwBrowser.viewport.height) {
                      pgwBrowser.viewport.orientation = 'landscape';
                  } else {
                      pgwBrowser.viewport.orientation = 'portrait';
                  }
  
              } else {
                  switch(window.orientation) {
                      case -90:
                      case 90:
                          pgwBrowser.viewport.orientation = 'landscape';
                          break;
                      default:
                          pgwBrowser.viewport.orientation = 'portrait';
                          break; 
                  }
              }
  
              // Orientation trigger
              $(window).trigger('PgwBrowser::OrientationChange');
  
              return true;
          }
docs: Set viewport orientation