Preview:
//This will reload the hidden page when the user rotates the device.

jQuery(window).on("orientationchange",function(){
  
    if(screen.availHeight < screen.availWidth){
        //alert("chng");
          jQuery( ".h-main-body" ).css( "display", "none" );
          var newLine = "\r\n"
          var msg = "Please Don't use Landscape!"
          msg += newLine;
          msg += "(Turn your phone)";
          msg += newLine;
          msg += "and wait a seconds,";   
          // msg += newLine;
          // msg += "for the page to reload.";   
          alert(msg);
      }
      else{
        jQuery( ".h-main-body" ).css( "display", "block" );
         //location.reload();
      }
 
});
downloadDownload PNG downloadDownload JPEG downloadDownload SVG

Tip: You can change the style, width & colours of the snippet with the inspect tool before clicking Download!

Click to optimize width for Twitter