<div class="codetitle"> <span><a style="CURSOR: pointer" data="31321" class="copybut" id="copybut31321" onclick="doCopy('code31321')"><u>复制代码</u></a></span> 代码如下:</div> <div class="codebody" id="code31321"> <br>//随鼠标上下滚动 <br>$(window).bind('scroll resize',function(){ <br>$('#sidebar').stop(true, true).animate({ <br>'top': $(document).scrollTop() + 'px' <br>},500); <br>}).scroll().resize(); <br> </div>