myfocus.pattern.extend({//*********************2010世博****************** 'mf_expo2010':function(settings,$){ var $focus=$(settings); var $piclist=$focus.find('.pic li'); var $txtlist=$focus.addlisttxt().find('li'); var $numlist=$focus.addlistnum().find('li'); $focus.addhtml('
'); //css var txth=settings.txtheight; $piclist.each(function(i){ this.style.display='none'; $txtlist[i].style.bottom=-txth+'px'; }); //play $focus.play(function(prev){ $piclist.eq(prev).fadeout(); $numlist[prev].classname=''; },function(next,n,prev){ $piclist.eq(next).fadein(); $txtlist.eq(prev).slide({bottom:-txth},200,'swing',function(){ $txtlist.eq(next).slide({bottom:0},200); }); $numlist[next].classname='current'; }); //control settings.delay=200;//固定其延迟 $focus.bindcontrol($numlist); } }); myfocus.config.extend({'mf_expo2010':{txtheight:36}});//默认文字层高度