orioltf
1/18/2013 - 12:26 PM

#JS: iOS detection. Adds an "ios" class to <html> if device is iOS

#JS: iOS detection. Adds an "ios" class to if device is iOS

/**
 * iOS: display iphone elements only to ios devices. Hide them in other devices.
 */
    .iphone {display: none;}
    .ios .iphone {display: block;}
if ( navigator.userAgent.match(/(iPad|iPhone|iPod)/i) ) {
    document.documentElement.className += " ios";
}