sniffing ie8 with js object detection


/ Published in: Other
Save to your folder(s)



Copy this code and paste it in your HTML
  1. function IEversion() {
  2. if (document.documentMode != 8 && document.namespaces && !document.namespaces[this.ns]) {
  3. this.IE6 = true;
  4. this.IE7 = true;
  5. }
  6. else if (document.documentMode == 8) {
  7. this.IE8 = true;
  8. }
  9. }

Report this snippet


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.