主要部分代码如下:
function Zz
XMusic(){
VAR aa={};
//模块设置
var setting = {
newSong:{'t
arget':'newSong','ty
PE':'1','
FirstCount':6,'Count':5},
songCharts:{'target':'newSong','type':'1','firstCount':2,'Count':4},
singer:{'target':'newSong','type':'1','firstCount':8,'Count':7},
rad
iostation:{'target':'newSong','type':'1','firstCount':9,'Count':2}
};
//默认加载模块
aa.newSong = new Zzx(setting.newSong);
//模块初始化
$(".menu_tagList").children("li").bind('click',function(){
for(var i in setting){
if($(this).attr("id")
==i){
if(typeof aa[i]
==='un
defined'){
aa[i] = new Zzx(setting[i]);
}else{
aa[i].in
IT();
}
}
}
$(".menu_hover").removeClass("menu_hover");
$(this).addClass("menu_hover");
})
}
//实例化控制台
var myControl = new Control({
audio : document.getElementById("myMusic"), //播放器
playModeNode : $("
#modeButton"), //模式选择按钮
play
BTn : $("#playButton"), //主控按钮
playTitle : $("#musicTitle"), //
歌曲TITLE容器
singerHead : $("#singerHead"), //歌曲
插图容器
PRogressWrap : $("#progressWrap"), //歌曲
进度条容器
progress : $("#progress"), //歌曲进度条
oWinObj : $("#oWindow"), //警告窗容器
allTimeNode : $("#totleTime"), //当前时间容器
currentTimeNode : $("#currentTime") //当前时间容器
});
ZzxMusic();
原文 www.