Select box
Get the id as checkAll add Click Event and change all within the time: the checkbox attribute checked is true;
Get the checkNo add click event as the id, and change all in the event: the checkbox attribute checked is false;
Get the id to add a click event for checkAga. Use the each () event to traverse the entries in checkbox [name = items] and change the checked attribute! (This) "attr (" checked ");
· Simplified display list
First, control the display index greater than 2 and remove the li label of the last entry to hide;
Add a toggle event to "show all brands" <span>. The first function displays all li. show () and changes the text of span ("simplified display ");
The second function repeatedly hides all li addresses greater than 2 and removes the last entry, and re-text the span tag ("Show All Brands ");
· Tab
First, add the mouseenter mouse to the li tag, get this, add attributes (selected class), and siblings (li ). removeClass ("selected class name"), to control the color of the selected li only
Step 2 control all child elements of the content display box children (). eq ($ (li ). index (this )). fadeIn (), and make all siblings (). hide ().
· Form Verification
Obtain all input tags named require and add a star to the strong tag!
Step 2 when the selected element loses focus, add a blur event;
Third, judge when $ (this) in the blur event function ). is ("# username"); when $ (this ). is ("# email") for email verification;
When the user name is verified, when this. value. length <6 is judged, a span label of the error message text is added to the parent element of the selected element, and vice versa;
During email verification, the span tag is cleared based on the class attribute created when the span tag is created, and a reg verification variable is created. The test () method of reg is called to verify the selected $ email. val (). when the verification value is false, create the error prompt span tag and add it to the parent element of the currently selected element! And vice versa!