/* From: http://devoracles.com/the-best-method-to-check-for-internet-explorer-in-javascript "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." */ var IE = /*@cc_on!@*/false; if (IE) { // do things for IE } else { // do things for other browsers }