I have the following bit of code shown below:
<div class="timer" id="timer"><img src="http://i.imgur.com/87XaOWA.png"><p class="close-message" id="close-message"></p></div>
Now, when the page is viewed in Internet Explorer I want the div
to be removed.
Since IE doesn't support the .remove() function I have found the following solution to circumvent the problem here. I have also found the following fiddle that can detect which browser is being used to view the page.
I've tried the following two if
statements to remove the div
tag when viewed in IE to no avail:
// Internet Explorer 6-11
var isIE = /*@cc_on!@*/false || !!document.documentMode
if (isIE = false) {
jQuery("#timer").eq(i).remove();
}
and
// Internet Explorer 6-11
var isIE = /*@cc_on!@*/false || !!document.documentMode
if (isIE = false) {
var node = document.getElementsById('timer')[i];
node.parentNode.removeChild(node);
}
What am I doing wrong? Individually the two components work fine, but when I try to use them together they don't work.