For users that don't want to use jQuery, you can simply do:
if (/*@cc_on!@*/false) {
alert('This is Internet Explorer!');
}
http://devoracles.com/the-best-method-to-check-for-internet-explorer-in-javascript
What we see up there? I declared a new
variable, called IE, which has the
value a comment block followed by
‘false‘. The above variable will be
understood by IE: var IE = !false,
because Internet Explorer uses JScript
— a Javascript-like dialect of the
standard ECMAScript — instead of
Javascript which is used by all the
other browsers. JScript can parse the
comments, just like Internet Explorer
(see conditional HTML comments post).
This is a unique feature of IE, none
of the other browsers can do it, so
Firefox, Chrome, Safari, Opera, all
will understand the above declaration
as IE = false.
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.
if (navigator.appName == 'Microsoft Internet Explorer') {
alert('This is Internet Explorer!');
}
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".