First Off, Ipad detects Portrait and landscape orientation.and we can go through a Media Queries with CSS3.CSS3 media queries allow us to change the layouts of the site by CSS with screen side detection.but sometimes it’s difficult to determine the orientation of Ipad device.
Must Read: Browser Detection with Joomla
For Ipad, we need to check, orientation change or detect orientation upon page loadings.Let’s have a look into the following code which give you a basic idea
onorientationchange is an event which is sent when the user changes the orientation of iOS and support on from iOS 1.1.1.
Also Read: Learn Responsive Web Design Online
For Page load event, Here I have called iPadOrientation () function on starting of code and when orientation of Ipad changed,window.onorientationchange is the orientation handling event which will call the function iPadOrientation when orientation of iPad is changed.