N00b Javascript/Jquery Question

Soldato
Joined
19 May 2005
Posts
4,549
Location
Glasgow, Rock City.
I'm in the midst of a multimedia project for uni, and I thought I'd more or less finished it until I started to test it in IE8 in uni.

Now, for all intents and purposes I'd avoid IE8 like the plague, but for some reason it's the default browser in uni and I reckon I may get marked down if I don't make my site/project work ok in IE8.

Now, onto the actual detail. My knowledge of javascript and jquery is so great that you could probably write it on the back of a post it note. However I was wondering if there was any code that one could use to have their site detect what browser a user is using, and disable a jQuery or Javascript element?

At the moment I have a fadein between page transitions (which is still not ideal, but the thing I ACTUALLY wanted to do was way beyond my ken), and this is written in jQuery. However it seems that IE8 doesn't like HTML5 and the fade doesn't work properly in IE8.

I'm also having an issue with embedded audio, specifically that the <audio> tag doesn't work in IE8. Tried a few alternatives but nothing's really worked well for me so far.

TL;DR - is there any way you can have a website detect which browser is being used and disable javascript/jquery elements as required?

Would love if anyone could help.

Cheers.
 
Back
Top Bottom