lisamiltonbayer
11/15/2017 - 10:04 AM

JS - Adding a class just to Internet Explorer

JS - Adding a class just to Internet Explorer

if (navigator.appName == 'Microsoft Internet Explorer' || !!(navigator.userAgent.match(/Trident/) || navigator.userAgent.match(/rv:11/)) || (typeof $.browser !== "undefined" && $.browser.msie == 1)) {
    // var f = document.getElementById("emailNewsOffers");
    // f.className += " ie-checkbox";
    // f.classList.add("ie-checkbox");
    document.getElementById("emailNewsOffers").className += " ie-checkbox";
}