我相信我已經解決了這個問題,顯然在jPLayer 2.5+中,您需要在設置爲noConflict的名稱中包含.jQuery。所以像這樣的
var jq = {jQuery: jQuery.noConflict(true)}
jq.jQuery(document).ready(function(){
new jPlayerPlaylist({
jPlayer: "#jquery_jplayer_1",
cssSelectorAncestor: "#jp_container_1"
}, [
{
title:"Track 1",
mp3:"track1.mp3"
},
{
title:"Track 2",
mp3:"track2.mp3"
},
{
title:"Track 3",
mp3:"track3.mp3"
},
{
title:"Track 4",
mp3:"track4.mp3"
},
], {
noConflict:"jq.jQuery",
swfPath: "",
supplied: "mp3",
wmode: "window"
});
});
所以
var jq=$.noConflict();
成爲
var jq = {jQuery: jQuery.noConflict(true)}
和
jq(document).ready(function(){
成爲
jq.jQuery(document).ready(function(){
最後
noConflict:"jq",
成爲
noConflict:"jq.jQuery",
來源
2014-01-05 23:18:19
Naz