Files
freeCodeCamp/guide/chinese/jquery/jquery-hover-method/index.md
2018-10-16 21:32:40 +05:30

16 lines
598 B
Markdown
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

---
title: jQuery Hover Method
localeTitle: jQuery悬停方法
---
# jQuery悬停方法
jquery悬停方法是`mouseenter``mouseleave`事件的组合。 语法是这样的:
```
$(selector).hover(inFunction, outFunction);
```
第一个功能inFunction当将要运行`mouseenter`事件发生。 第二个函数是可选的,但会在`mouseleave`事件发生时运行。 如果只指定了一个函数,则另一个函数将同时针对`mouseenter``mouseleave`事件运行。
### 更多信息
更多信息可以在[这里](https://www.w3schools.com/jquery/event_hover.asp)找到。