複製程式碼
複製程式碼
複製程式碼
程式碼如下:
var loading = function(a,b){
var c = b*1.5;
if(b==100){
$('.bgloader .jindu2').animate({width:c 'px'},500,function(){
$('.bgloader .tip1').text(a);
$( '.bgloader font').text(b);
$('.bgloader .loading').animate({top:'-32px'},1000,function(){
$('.bgloader ').fadeOut();
});
});
}else{
$('.bgloader .jindu2').animate({width:c 'px'},500 ,function(){
$('.bgloader .tip1').text(a);
$('.bgloader font').text(b);
});
} }; 這裡我寫了個loading(a,b),兩個參數分別是顯示載入內容提示資訊和載入進度百分比,然後,我用了其他幾個js函式庫做載入進度測試
複製程式碼 程式碼如下:
> ;
;
> ;
;
> ;
> ;
> ;
示範下載位址:
點選下載