Comments: HTML5 works are similar to cool-dog html5 mobile phone music players. After testing, the results are good. Unfortunately, only Google and Apple browsers with webkit core are supported, if you are interested, you can learn the HTML5 works. After testing, the results are good. Unfortunately, only Google and Apple browsers with webkit core are supported, please use Google or other browsers to run the user experience. Otherwise, you will not be able to see the effect.
The Code is as follows:
The main code is as follows:
Function ZzxMusic (){
Var aa = {};
// Module Settings
Var setting = {
NewSong: {'target': 'newsongg', 'type': '1', 'firstcount': 6, 'Count': 5 },
SongCharts: {'target': 'newsongg', 'type': '1', 'firstcount': 2, 'Count': 4 },
Singer: {'target': 'newsongg', 'type': '1', 'firstcount': 8, 'Count': 7 },
RadioStation: {'target': 'newsongg', 'type': '1', 'firstcount': 9, 'Count': 2}
};
// Default module Loading
Aa. newSong = new Zzx (setting. newSong );
// Module initialization
$ (". 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"). removeClass ("menu_hover ");
$ (This). addClass ("menu_hover ");
})
}
// Instantiate the Console
Var myControl = new Control ({
Audio: document. getElementById ("myMusic"), // player
PlayModeNode: $ ("# modeButton"), // mode selection button
PlayBtn: $ ("# playButton"), // master button
PlayTitle: $ ("# musicTitle"), // song TITLE container
SingerHead: $ ("# singerHead"), // container of Song illustration
ProgressWrap: $ ("# progressWrap"), // container of the Song progress bar
Progress: $ ("# progress"), // song progress bar
OWinObj: $ ("# oWindow"), // warning window container
AllTimeNode: $ ("# totleTime"), // current time container
CurrentTimeNode: $ ("# currentTime") // current time container
});
ZzxMusic ();
Original www.jq-school.com