IOS device user Agent and safari browser agent


/*IOS device user Agent */
var device = navigator.userAgent.toLowerCase();
var ios = device.match(/(iphone|ipod|ipad)/);
if (ios){
console.log('Its ios device');
}

/*IOS device user Agent , it's work only safari browser*/
if (navigator.userAgent.indexOf('Safari') != -1 && navigator.userAgent.indexOf('Chrome') == -1) {
setTimeout(function(){
console.log('safari loaded');
jQuery('.fotorama__stage__shaft').css("transform","");
}, 4600);
}

});

Comments

Popular posts from this blog

TypeScrpt basics

font-face HTTPS issue fixes