复制代码 代码如下:
<script type="text/javascript">
$.fn.silde = function() {
var position = function(element) {
var top = element.position().top, pos = element.css
("position");
$(window).scroll(function() {
var scrolls = $(this).scrollTop();
if (scrolls > top) {
if (window.XMLHttpRequest) {
element.css({
position: "fixed",
top: 0,
left:1080,
"margin-left":"0px",

});
} else {
element.css({
top: scrolls,
"margin-left":"20px"
});
}
}else {
element.css({
position: pos,
top: top,
"margin-left":"20px"
});
}
});
};
return $(this).each(function() {
position($(this));

});
};
$("#ding").silde();
</script>
华山资源网 Design By www.eoogi.com
广告合作:本站广告合作请联系QQ:858582 申请时备注:广告合作(否则不回)
免责声明:本站资源来自互联网收集,仅供用于学习和交流,请遵循相关法律法规,本站一切资源不代表本站立场,如有侵权、后门、不妥请联系本站删除!
华山资源网 Design By www.eoogi.com