0

I need to create iOS devices differentiation based on sizes to change UI sizes using javascript. I did devices oreantaion using below javascript code.

function doOnOrientationChange()
  {
      switch(window.orientation)
      {
          case -90:
          case 90:
          alert('landscape');
          break;
          default:
          alert('portrait');
          break;
      }
  }

        window.addEventListener('orientationchange', doOnOrientationChange);

        // Initial execution if needed
        doOnOrientationChange();

I want to create different iOS device detection like (iPhone4 height = 480, iPhone5 = 568, iPad = 768,etc...), Based on the device size detection I want to change page content size like below

<div id="container" style="height: 590px; min-width: 300px"></div>
Apple_Ajay
  • 227
  • 4
  • 17
  • Is it related to your previous question? http://stackoverflow.com/questions/35503762/how-to-detect-ios-different-device-using-javascript – Sheepy Feb 22 '16 at 06:32
  • No. From that question I got some solutions. Now its diffrent @Sheepy – Apple_Ajay Feb 22 '16 at 06:35

0 Answers0