Brilliant, thanks guys for your help!
The reason I'm after the recognising of IE10, is because I'm trying to make my "rotator.js" GSAP script, not load if the browser is IE10, funnily enough, because of lack of support for the preserve-3d rule.
I've managed to sort the preserve-3d issue out using the IE10 preserve 3D workaround, not the best, but it works for now.
I'm coming up with an issue with your script snippet, it's saying this:
"Uncaught ReferenceError: isDocumentMode is not defined"
Any thoughts guys?
I've put the snippet with the <head> tags within a <script> tag, and that had the same error, and I also put the snippet within my rotator script. Both above and below the Tweenmax code, and that gave the error also.
Where can I place this snippet?
var hasDocumentMode = (document.documentMode !== undefined),
isIE10 = (isDocumentMode === 10);
// browser is IE
if(hasDocumentMode) {
if(isIE10){
// browser is IE10
}
}
This is my rotator.js:
window.onload = function(){
var logo = document.getElementById("main_flip");
var myTimeline = new TimelineMax({repeat:-1, yoyo:true, repeatDelay:6});
myTimeline.append( new TweenMax.to(logo, 30, {ease:Elastic.easeInOut, css:{rotationY:1260}}) );
myTimeline.append( new TweenMax.to(logo, 30, {delay: 6, ease:Elastic.easeInOut, css:{rotationY:0}}) );
}