I am trying to change a song to jQuery using the developer guide, I came up with this function:
<script type="text/javascript"> $(document).ready(function(){ $('.embedinfo').click(function() { $("#jquery_jplayer_1").jPlayer( "clearMedia" ); $("#jquery_jplayer_1").jPlayer({ ready: function () { $(this).jPlayer("setMedia", { mp3:"/audio/<?php echo $audioarray[0]['audio']; ?>" }).jPlayer("<?php if(empty($auto)){ echo "pause"; } elseif($auto==1){ echo "play"; } ?>"); }, swfPath: "/js/Jplayer.swf", supplied: "mp3", wmode: "window", solution:"flash,html", volume:"1" }); });
});
The setMedia function is actually identical to the function that I use to initially configure the music (which really works), however this function to change the music from pressing does not work.
The clearMedia function works, just isnt there. Why doesn't it work?
source share