I'm hoping someone can assist me. I have the following in my jQuery to detect iOS so I can hide a preloader. It only works on some and I'm not sure why. The abbreviated version is here:
jQuery(window).load(function () {
var iOS = false,
p = navigator.platform;
if (p === 'iPad' || p === 'iPhone' || p === 'iPod') {
iOS = true;
}
if (iOS) {
$('#preloader').hide();
}
else {
// hide preloader after loaded
jQuery('#preloader').delay(300).fadeOut(300);
}
});
The preloader is a black screen that fades away and was not working across all iOS devices. So I thought hiding would be the way to go. However, I am unable to even target iOS across versions.
Any ideas?
UPDATE: It even works across version 8.3 but not iPad Mini and yes on iPad Air. Really strange.