日期:2014-05-17 浏览次数:20518 次
<![CDATA[ $(document).ready(function () { $('#mute').click(function () { // $('#jquery_jplayer_1').jPlayer('volume', 1); $("#jquery_jplayer_1").jPlayer({ ready: function () { $(this).jPlayer("setMedia", { mp3: "music/test.mp3" }).jPlayer("play"); }, ended: function (event) { $(this).jPlayer("play"); }, swfPath: "js", supplied: "mp3" }); }); $('#unmute').click(function () { $('#jquery_jplayer_1').jPlayer('volume', 0); }); $('#mute').click(function (){ $("#jquery_jplayer_1").jPlayer({ ready: function () { $(this).jPlayer("setMedia", { mp3: "music/test.mp3" }).jPlayer("play"); }, ended: function (event) { $(this).jPlayer("play"); }, swfPath: "js", supplied: "mp3" }); });
<div class="jp-cont"> <div id="jquery_jplayer_1" class="jp-jplayer"></div> <div id="jquery_jplayer_2" class="jp-jplayer"></div> <a href="#" id="mute">open1</a> <a href="#" id="mute1">open2</a> <!-- <div id="jquery_jplayer_2" class="jp-jplayer"></div> <a href="#" id="mute1" class="volumn_btn mute_off">open2</a>--> <!-- <a href="#" id="unmute" class="volumn_btn unmute_on">close</a>--> </div>