jQuery用unbind方法去掉hover事件及其他方法介绍

时间:2013-03-18    点击:90   
今天遇到jquery怎么去掉hover的问题,最开始以为直接unbind(“hover”)就可以搞定,可是搞了半天都失败拉。百度也搜了很多关于jquery中对hover事件unbind,后还是在一个老外的博客上看到了正确的方法,现在爱微网拿出来共享网上所说的jquery取消hover事件有以下几种方法
复制代码 代码如下:

/* 这种方法是错误的 */
$(#hover_div).unbind(hover);
/* 这种方法也是错误的 */
$(#hover_div).unbind(mouseover).unbind(mouseout);
/* 这种方法是新增的,在老的版本里是无法使用的 */
$(#hover_div).unbind(mouseenter mouseleave);
/* 这种方法正确的,新老版本皆可用 */
$(#hover_div).unbind(mouseenter).unbind(mouseleave);
Javascript中valueOf与toString区别浅析
Javascript Throttle & Debounce应用介绍
JS 实现获取打开一个界面中输入的值
打开新窗口关闭当前页面不弹出关闭提示js代码
jQuery Mobile页面跳转后未加载外部JS原因分析及解决
> 返回     
地址:上海市普陀区胶州路941号长久商务中心 电话: QQ:
© Copyright 2012 上海网络 Product All Rights Reserved