The previous version of my code got a major flaw. For each link it found it added a click event. The second link it found got two click events so the second canceled the first. The thirth got three click events so the code worked, and so on.
This was solved by replacing
$("img.mp3control").click(function()
by
$(this).find("img.mp3control").click(function()
I also changed the class value of the image to mp3control because i thought play was to generic.
Someone on the jquery list told me it wasn't working on IE6 and he is right. The player is added and removed but it gets stuck loading the file. In firefox 1.5 and Opera 9 the file plays.
The adjusted code can be found in the head tag of the sourcecode.
No comments:
Post a Comment