$(function(){ $.fn.extend({ // εˆδ½œζœΊζž„ cooperativePosition:function(){ var spanWidth = $(this).find('span').height(); this.hover(function(){ $(this).find('span').animate({ bottom:'0' },100); },function(){ $(this).find('span').animate({ bottom:'-40px' },100); }) } }); function pageFun(){ $('.cooperative-content-box div ul li').cooperativePosition(); } pageFun(); })