How to use the hover method and toggle method in jQuery

Source: Internet
Author: User
This article focuses on the usage and examples of the two hover and toggle functions in jQuery. it is very simple and practical and is recommended for reference by friends. JQuery provides some methods (such as toggle) to combine the effects of the two events, such as mouseover, mouseout, keyup, and keydown.

1. hover functions

Hover (over, out) is a method that imitates a hover event (move the mouse over an object and remove it from it. This is a custom method that provides a "keep in it" status for frequently used tasks.
Parameters:
Over (Function): the Function to be triggered when you move the cursor over an element.
Out (Function): the Function to be triggered by removing the mouse from the element.

The code is as follows:


Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.