I want to create a JavaScript function to hide the html if the visitor is using an IE browser. I did some research on Stackoverflow and the below is what I came up. It doesn't work. Can anyone tell me what I did wrong? Thanks!
HTML:
<div id="content">
Hello
</div>
JS:
var isIE = /*@cc_on!@*/false || !!document.documentMode;
if (isIE === 'true') {
function display() {
document.getElementById('content').style.display="none";
}
}