I have page like this
<html>
<head>
<div id="container">
Hello, this is NON-IE content.
</div>
</head>
</html>
What I want is to Stop Internet Explorer [ IE ] from loading OR Neglecting <div id="container"> & allow all other browsers to load It.
Don’t want to use <!--[if IE 7]>.
Looking for Javascript to work with.
How Can I achieve this ?
Thanks
- Mandar
For users that don’t want to use jQuery, you can simply do:
http://devoracles.com/the-best-method-to-check-for-internet-explorer-in-javascript
Note: If any other browser were to use “JScript” this would pass, but since JScript is written by Microsoft I think you’re safe. Another method is the navigator object, which you can pull the application name. Although some applications like to spoof this, so I believe the JScript is a bit more reliable.
Edit: This was more to help users in detecting IE, not about directly answering the users question. Also, for users not wanting to use jQuery you could simple do document.getElementById(‘container’).style.display = ‘none’; — Just figured I’d add this in since my post did mention “without using jQuery”.