Javascript – Detect IE8, IE7, Safari, FireFox with jQuery 1.3+

browser-detectionjavascriptjqueryobject-detection

I need to change a value based on each browser since they all render differently.

if (navigator.appName == 'Netscape'){
        top = 17;
}

This was working but unfortunately both Firefox and Safari show up as "Netscape"

How would I use jQuery 1.3.2 to detect all these? I couldn't find any info under jquery.support now that jquery.browser is gone.

Thanks!

Best Solution

If you must have browser detection (despite the warnings against it), ppk's routine is current (even up through Chrome and iPhone).