/** * jquery-expand-1.0.js * author:tww **/ (function(){ /** * jQuery fadeTo expand. **/ jQuery.fn._fadeTo = function(timer,opacity){ var that = this; var fadeTo_default=timer; this._interval = setInterval(function(){ fadeTo_default =fadeTo_default-(1-opacity)*100; if(fadeTo_default/timer<=opacity){ clearInterval(_interval); } jQuery(that).css("opacity",fadeTo_default/timer); },100); this.stop=function(){ window.clearInterval(this._interval); } return this; } })();