Jquery实现延迟加载数据
2012-11-18 21:33
411 查看
(function($){ $.fn.hoverDelay = function(options){ var defaults = { hoverDuring: 150, outDuring: 1, hoverEvent: function(){ $.noop(); }, outEvent: function(){ $.noop(); } }; var sets = $.extend(defaults,options || {}); var hoverTimer, outTimer; return $(this).each(function(){ $(this).hover(function(){ clearTimeout(outTimer); hoverTimer = setTimeout(sets.hoverEvent, sets.hoverDuring); },function(){ clearTimeout(hoverTimer); outTimer = setTimeout(sets.outEvent, sets.outDuring); }); }); } })(jQuery);
$(selector).hoverDelay({ hoverEvent: function(){ alert("我来晚了,不好意思啊!"); } });
相关文章推荐
- jquery插件jquery.lazyload实现的图片延迟加载
- 使用jquery.more.js来实现点击底部更多后, 底部加载出新的数据
- 基于jquery实现页面滚动到底自动加载数据的功能
- 使用jquery插件实现图片延迟加载技术详细说明
- JQuery LazyLoad实现图片延迟加载-探究
- 设计一种前端数据延迟加载的jQuery插件(2)
- jQuery实现当拉动滚动条到底部加载数据
- dhtml xgrid实现前台大数据延迟加载效果
- jquery.lazyload实现延迟加载
- jquery实现瀑布流效果 jquery下拉加载新数据
- jquery.lazyload 插件实现图片延迟加载
- jQuery实现模仿微博下拉滚动条加载数据效果
- jQuery实现当拉动滚动条到底部加载数据
- Jquery.LazyLoad.js修正版下载,实现图片延迟加载插件
- asp.net网站开发中用jquery实现滚动浏览器滚动条加载数据(类似于腾讯微博)
- jquery.lazyload 实现图片延迟加载jquery插件
- jquery插件jquery.lazyload实现的图片延迟加载
- jquery.lazyload 实现图片延迟加载jquery插件
- asp.net网站开发中用jquery实现滚动浏览器滚动条加载数据(类似于腾讯微博)