HTML5作品,经
代码如下:
主要部分代码如下:
function ZzxMusic(){
var aa={};
//模块设置
var setting = {
newSong:{‘target’:’newSong’,’type’:’1′,’firstCount’:6,’Count’:5},
songCharts:{‘target’:’newSong’,’type’:’1′,’firstCount’:2,’Count’:4},
singer:{‘target’:’newSong’,’type’:’1′,’firstCount’:8,’Count’:7},
radioStation:{‘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]===’undefined’){
aa[i] = new Zzx(setting[i]);
}else{
aa[i].init();
}
}
}
$(“.menu_hover”).removeClas