Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- window.onorientationchange = detectIPadOrientation;
- function detectIPadOrientation () {
- if ( orientation == 0 ) {
- jQuery('.home-banner').css('height', 'auto');
- alert ('Portrait Mode, Home Button bottom');
- }
- else if ( orientation == 90 ) {
- jQuery('.home-banner').css('height', jQuery(window).outerHeight());
- //alert ('Landscape Mode, Home Button right');
- }
- else if ( orientation == -90 ) {
- jQuery('.home-banner').css('height', jQuery(window).outerHeight());
- //alert ('Landscape Mode, Home Button left');
- }
- else if ( orientation == 180 ) {
- jQuery('.home-banner').css('height', 'auto');
- alert ('Portrait Mode, Home Button top');
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement