Here's a method for getting the current IE or the IE Version:
function IE(v) {
return RegExp('msie' + (!isNaN(v)?('\\s'+v):''), 'i').test(navigator.userAgent);
}
Here's how you can use it:
if(IE()) alert('Internet Explorer!');
if(IE(10)) alert('Internet Explorer 10!');