I'm trying to figure out how to change css display from none to block with javascript but only for IE. Currently I have this code but it won't change the CSS on ID #backfill-image.
<script>
function isIE() {
ua = navigator.userAgent;
/* MSIE used to detect old browsers and Trident used to newer ones*/
var is_ie = ua.indexOf("MSIE ") > -1 || ua.indexOf("Trident/") > -1;
return is_ie;
}
/* Create an alert to show if the browser is IE or not */
if (isIE()){
document.getElementById("backfill-image").style.display = "block";
}
</script>