audio - jquery sound not playing -


I want a sound when there is more than 50 x position value in a div. I control the div with my arrow keys.

I'm guessing audioElement.play () is not working.

Neither the sound nor the warning pop up (function place)

down Fixed code

  First of all, your sound handle was out of the scope, so I defined it in the window: window.audioElement = audioElement = blabla second you try to compare the object with a number Was doing. There is no need to wrap x.left in Jquery. If (x.left> 50)    

Comments

Popular posts from this blog

php - How can I cram 6+31 numeric characters into 22 alphanumeric characters? -

mysql - where clause in inner join query -

java - Why my included JSP file won't get processed correctly? -