锋利的jQuery(知识杂货铺)
2017-02-28 21:54
281 查看
jQuery有两个合成事件:
hover()方法用于模拟光标悬停事件。
toggle()方法用于模拟鼠标连续单击事件。
事件冒泡问题:事件会按照DOM的层次结构像水泡一样发生连锁反应。
hover()方法、
toggle()方法。
hover(enter,leave);
$(function () { $('#panel h5.head').hover(function () { $(this).next('div.content').show(); },function () { $(this).next('div.content').hide(); }) })
hover()方法用于模拟光标悬停事件。
toggle(fn1,fn2,fn3,...,fnN)
$(function () { $('#panel h5.head').toggle(function () { $(this).next('div.content').show(); },function () { $(this).next('div.content').hide(); }) })
toggle()方法用于模拟鼠标连续单击事件。
事件冒泡问题:事件会按照DOM的层次结构像水泡一样发生连锁反应。
相关文章推荐
- 锋利的JQuery----JavaScript基础知识(一)
- 锋利的jQuery-7--编写插件基础知识
- 锋利的JQuery----JavaScript基础知识(二)
- 锋利的jquery-jQuery文字提示
- 锋利的jQuery中appserv搭建中的问题
- 【锋利的JQuery】0x06 JQuery与Ajax的应用
- jQuery知识总结
- 锋利的Jquery【读书笔记】 -- 第五章 jQuery对表单表格的操作
- JQuery基础知识(一)
- jquery零星知识之$(function(){});
- 锋利的jquery第二版学习笔记
- jQuery 学习一(基础知识)
- 关于jquery的基础知识
- jQuery知识(转)
- [jQuery]基础知识
- jquery笔记(基础知识)
- jquery小知识——自定义isNull
- 一步一步Jquery 准备知识 (一)
- jQuery知识汇总
- 锋利jquery---第四章