Skip to content

Instantly share code, notes, and snippets.

View rluquero's full-sized avatar

Ricard Luquero rluquero

View GitHub Profile
@rluquero
rluquero / detect-ie.js
Created August 24, 2016 15:39 — forked from miguelmota/detect-ie.js
Detect IE in JavaScript
function detectIE() {
var ua = window.navigator.userAgent;
var msie = ua.indexOf('MSIE ');
if (msie > 0) {
// IE 10
return parseInt(ua.substring(msie + 5, ua.indexOf('.', msie)), 10);
}
var trident = ua.indexOf('Trident/');