JQuery Hover Event Simple implementation bind 2 methods simultaneously _jquery

Source: Internet
Author: User

This example describes the jquery hover event simple implementation that binds 2 methods simultaneously. Share to everyone for your reference, specific as follows:

The hover event is hung here at the same time 2 methods:

One is performed while hovering, and the other is performed when left.

The code is as follows:

$ (document). Ready (function () {
$ ("#orderedlist li"). Hover (
function () {$ (this). addclass ("Blue");
Function () {$ (this). Removeclass ("Blue");});


PS: The above Code Small series did not format processing, here by the way for you to recommend several online code format, landscaping tools, I believe that we will use in the future development process:

Online JavaScript code Landscaping, formatting tools:
Http://tools.jb51.net/code/js

JavaScript compression/formatting/encryption tool:
http://tools.jb51.net/code/jscompress

JSON code online Format/beautify/compress/edit/Convert tools:
Http://tools.jb51.net/code/jsoncodeformat

Online JSON code inspection, inspection, landscaping, formatting tools:
Http://tools.jb51.net/code/json

More interested readers of jquery-related content can view the site's topics: A summary of Ajax usage in jquery, a summary of jquery table (table) operations tips, a summary of jquery drag-and-drop effects and techniques, a summary of jquery extension techniques, jquery Common Classic Effects Summary "jquery animation and special effects usage Summary", "jquery selector usage Summary" and "jquery common Plug-ins and Usage summary"

I hope this article will help you with the jquery program design.

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.