View Single Post
Old 02-23-2013, 03:29 PM   PM User | #2
xelawho
Senior Coder

 
xelawho's Avatar
 
Join Date: Nov 2010
Posts: 2,437
Thanks: 52
Thanked 453 Times in 451 Posts
xelawho will become famous soon enoughxelawho will become famous soon enough
I'm not sure about the specifics of the audio player, but generally you can test for the existence of a function before calling it, and wrap the necessary code in that code block

Code:
if($('#music').pause()){
// put all your non-IE stuff here 
}
// rest of code goes outside of "if" statement
there are other ways of browser sniffing, of course, but they can be unreliable - to me it seems logical that if you are unsure if a function is going to run, to simply test if that function is recognised first
xelawho is offline   Reply With Quote