---
title: "jquery如何取消hover事件"
author: "kingour1986"
date: "2011-08-30T10:50:49Z"
tags: []
categories: ["Web前端"]
slug: "jquery-hover"
draft: false
lastmod: "2011-08-30T10:50:49Z"
id: 1161158
url: "https://kingour.iteye.com/blog/1161158"
---

今天用jquery写hover事件，临时遇到个需求需要遇到特定条件能够取消hover事件，但是使用

 

```
$("a").unbind("hover");
```

 起不到任何作用，最后在stackover上查到解决办法：

```
$("a").unbind('mouseenter mouseleave');
```

 在jquery的官方文档上有这方面的说明： [jQuery documentation](http://docs.jquery.com/Events/hover#overout)