肤控制 if(options.skin) thisBox.addClass('side_'+options.skin); //核心scroll事件 $(window).bind("scroll",function(){ var offsetTop = defaultTop + $(window).scrollTop() + "px"; thisBox.animate({ top: offsetTop }, { duration: options.durationTime, queue: false //此动画将不进入动画队列 }); }); //close事件 closeBtn.bind("click",function(){ sideContent.animate({width: '0px'},"fast"); show_btn.stop(true, true).delay(300).animate({ width: '25px'},"fast"); }); //show事件 show_btn.click(function() { $(this).animate({width: '0px'},"fast"); sideContent.stop(true, true).delay(200).animate({ width: '240px'},"fast"); }); }); //end this.each }; })(jQuery);