I have writed a function like this jQuery.extend({ buildprocess: function(seconds,target,json) { var self=this; $("#"+target).append("<li id=\"bing_"+json.t+"_"+json.c +"\">"+json.t+json.l+"level <span id=\"bing_"+json.t+"_"+json.c +"_1\"></span></li>") var ___timer=setInterval(CountDown,1000) function CountDown() { $("#bing_"+json.t+"_"+json.c +"_1").html(__Seconds2Time(seconds)); seconds--; if(seconds<=0) { clearInterval(___timer); $("#bing_"+json.t+"_"+json.c+"").remove(); } } } });
when I just run it like this: $.buildprocess(6,"ul1",{w:300,s:240,i:90,f:180,t:1004,c:1,l:1,dt:10}); it works well but i run it : $.buildprocess(6,"ul1",{w:300,s:240,i:90,f:180,t:1004,c:1,l:1,dt:10}); $.buildprocess(12,"ul2",{w:300,s:240,i:90,f:180,t:1004,c:1,l:1,dt: 10}); it cann't works What can I do while in the last condition ?????