jquery添加hover事件和销毁hover事件
2015-07-18 12:33
691 查看
代码
//销毁hover事件
$('#sx').click(function(){ $(this).css('background','#e6ff10'); $(this).unbind('mouseenter').unbind('mouseleave'); }); //添加hover事件 $('#sx').bind({mouseenter: function(e){ $(this).css('background','#c51616'); }, mouseleave: function(e) { $(this).css('background','#000'); },click:function(e){ } });
相关文章推荐
- jquery mobile自动弹出popup
- JQuery中ajax方法访问web服务实例
- 【JQuery】Ecshop与Jquery冲突的完…
- for循环和jquery的each()跳出循环的方法
- jquery三级联动
- 鼠标滚轮事件----jquery-mousewheel
- jQuery插件 -- Cookie插件
- jquery 时间json格式为时间年月日时分秒jqueryUI+Struts+hibernate
- Jquery mobile 新手问题总汇
- jQuery Mobile教程:jQuery Mobile基本事件
- jQuery设计思想
- jQuery最佳实践
- JQuery中ajax方法访问web服务实例
- jquery实现用户信息修改验证输入方法汇总
- jQuery实现在最后一个元素之前插入新元素的方法
- jQuery插件简单实现方法
- jQuery增加自定义函数的方法
- jQuery获取URL请求参数的方法
- 基于jQuery左右滑动切换特效 附源码
- 基于jQuery左右滑动切换特效 附源码