I am trying to make a basic jplayer text link when clicked to play an mp3 file, but I cannot make it work because there is no sound. here is the code
$(document).ready(function(){ $("#jquery_jplayer").jPlayer({ ready: function (event) { $('.voice').click(function(e) { e.preventDefault(); $(this).jPlayer("setFile", $(this).attr('href')).jPlayer("play"); }); }, swfPath: "/ui/core/js/jPlayer/", supplied: "mp3", wmode: "window" });
});
here is the html:
<table> <tr> <td> <a href="music.mp3" class="voice">Listen</a> </td> </tr> </table> <div id="jquery_jplayer"></div>
What am I missing?
thanks
source share