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.