JS插件汇总
来源:互联网 发布:c语言ns流程图 编辑:程序博客网 时间:2024/05/17 01:50
</pre><pre code_snippet_id="575838" snippet_file_name="blog_20150109_1_2510011" name="code" class="javascript">
//jQ滚动固定插件
(function($) {$.fn.addfix = function(option) {var defaults = {fixedClass: "navfix",};var ops = $.extend(defaults, option);var fixtop = $(this).offset().top;var fixleft = $(this).offset().left;var fixwidth = $(this).width();var $that = $(this);$(window).scroll(function() {wtop = $(window).scrollTop();if (wtop >= fixtop) {$that.addClass(ops.fixedClass).css({"left": fixleft + "px","width": fixwidth + "px",});//$that.addClass("navfix");} else {$that.removeClass(ops.fixedClass);}});};})(jQuery);
</pre><pre code_snippet_id="575838" snippet_file_name="blog_20150111_5_5898666" name="code" class="javascript"><pre name="code" class="css">.navfix {position: fixed;top: 0;z - index: 9999;/*width: 100%;*/}body {/*padding-top: 100px;*/}
$("#telid").addfix();//调用
0 0
- JS插件汇总
- js插件汇总
- js汇总
- Js汇总
- js 汇总
- Eclipse 插件汇总
- JQuery 插件汇总
- JQuery插件汇总
- Ajax:jQuery 插件汇总
- eclipse 插件汇总
- jQuery 表格插件汇总
- jQuery 表格插件汇总
- Eclipse常用插件汇总
- jQuery 表格插件汇总
- [vim]vim 插件汇总
- jQuery所有插件汇总
- JQuery 表格插件汇总
- unity3d必学必会插件汇总
- VS2005调试技巧集合
- 申请免费代码签名证书
- Next Permutation -- leetcode
- android中init过程解析
- LeetCode Palindrome Partitioning II
- JS插件汇总
- iOS APP支持64位相关资料整理
- Duilib技巧:背景图片平铺
- android的网络请求服务端后解析jsone
- epol模型详解
- TestNG - xml include other suite xml file
- css透明度的一些兼容测试
- ArcGIS教程:地统计模拟的重要概念
- IO Manager and Device Driver