jQuery简单实现页面元素置顶时悬浮效果示例

本文实例讲述了jQuery简单实现页面元素置顶时悬浮效果的方法。分享给大家供大家参考,具体如下:

一、JS Code:

top) { if (window.XMLHttpRequest) { element.css({ position: "fixed",top: 0 }); } else { element.css({ top: scrolls }); } } else { element.css({ position: pos,top: top }); } }); }; return $(this).each(function () { position($(this)); }); }; //绑定 $("#float").smartFloat();

二、Html Code:
























更多关于jQuery相关内容感兴趣的读者可查看本站专题:《》、《》、《》、《》、《》、《》、《》、《》、《》及《

希望本文所述对大家jQuery程序设计有所帮助。

相关文章

1.第一步 设置响应头 header('Access-Control-Allow...
$.inArray()方法介绍 $.inArray()函数用于在数组中搜索指定的...
jquery.serializejson.min.js的妙用 关于这个jquery.seriali...
JS 将form表单数据快速转化为object对象(json对象) jaymou...
jQuery插件之jquery.spinner数字智能增减插件 参考地址:http...