<div class="codetitle"> <span><a style="CURSOR: pointer" data="99001" class="copybut" id="copybut99001" onclick="doCopy('code99001')"><u>复制代幣</u></a></span>代码如下:</div> <div class="codebody" id="code99001"> <br><script type="text/javascript"> <br>$.fn.silde = function() { <br>var Position = function(element) { <br>var top = element.position().top, pos = element.css <br>("position" ); <br>$(window).scroll(function() { <br>varscrolls = $(this).scrollTop(); <br>if (スクロール > トップ) { <br>if (window.XMLHttpRequest) { <br>element.css({ <br>position: "fixed", <br>top: 0, <br>left:1080, <br>"margin-left":"0px", <br><br> }); <br>} else { <br>element.css({ <br>top: スクロール, <br>"margin-left":"20px" <br>}); else { <br>element.css({ <br>position: pos, <br>top: top, <br>"margin-left":"20px" <br>}); ); <br>}; <br>return $(this).each(function() { <br>position($(this)); <br><br>}); <br>}; <br>$("#ding").silde(); <br></script> <br><br> </div>