1
在我的頁面中有一些mp3鏈接,我使用jplayer。點擊單獨鏈接時如何更新jplayer函數播放?jplayer在單個頁面中的多個mp3鏈接
$(document).ready(function() {
$("#jquery_jplayer_1").jPlayer({
ready: function(event) {
$(this).jPlayer("setMedia", {
mp3: "test_1.mp3", //my mp3 file
});
},
swfPath: "http://www.jplayer.org/2.1.0/js",
supplied: "mp3"
});
});
我的MP3鏈接:
<a href="javascript:listen(1);" class="jp-play" ></a>
<a href="javascript:listen(2);" class=" jp-play" ></a>
<a href="javascript:listen(3);" class=" jp-play" ></a>
<a href="javascript:listen(4);" class=" jp-play" ></a>
<a href="javascript:listen(5);" class=" jp-play" ></a>
它不工作的第二個鏈接,當它點擊它test_1.mp3播放 – user1264362
,因爲你沒有一個名爲'test_2.mp3'的MP3 – mgraph
在這個鏈接每次test1.mp3播放。我不明白爲什麼。 http://www.dilyurdu.com/audio.htm – user1077300