I need to detect not only the browser type but version as well using jQuery. Mostly I need to find out if it is IE 8 or not.
I am not sure if I am doing it correctly
Don't forget that you can also use HTML to detect IE8.
Having that before all your scripts will let you just check the "ie" variable or whatever.