Continue on to an article
Next is the form selector
Form Object Properties Filter Selector
Or do you want to write a form page as a sample
<! DOCTYPE html>
The preview results are as follows:
If we write the jquery code as follows
$ ("#form1 input:enabled"). Val ("Here's the change.") ");
Then his role will be as follows, all enabled settings of the input field content, has been changed.
Modify jquery again as follows
$ ("#form1 input:disabled"). Val ("There's been a change here.") ");
Input form fields for all disabled properties are modified
form selector
actual Operation
Use a website similar to the electronic business to do the actual operation
The basic effect is as follows
Main objectives:
1: Make a button, you can let the above list for all/part of the switch between the display, but the other brand camera several words must be retained
2: In the partial display case, let the specified brand highlight
$ (function () {var $category = $ (' ul li:gt (5): Not (: last) '); Select the 6th to the 2nd of the list cell, without the last $category. Hide (); Hide operations on selected objects var $toggleBtn = $ (' Div.showmore > A '); Select the a element in the div named ShowMore $toggleBtn. Click (function () {//Add the Click event for this hyperlink ($cate Gory.is (": Visible")) {//If the category element is visible $category. Hide ();
Hide operations on category $ ('. ShowMore a span '). CSS ("Background", "url (./img/down.gif) no-repeat 0 0"). Text ("Show All Brands");
And the class for showmore within the text, add a background picture, and the text will be modified to display all the brand $ (' ul Li '). Removeclass ("promoted"); Remove the promoted class name of each list element, promoted this class name is a CSS}else{$category that lets text display highlights. Show (); Conversely, the category is adjusted to show state $ ('. ShowMore a span '). CSS ("Background", "url (./img/up.gif) no-repeat 0 0"). Text ("Compact display brand"
); The background picture is modified and the text is changed to a compact display brand $ (' ul Li '). filtER (": Contains (' Canon '),: Contains (' Nikon '),: Contains (' Olympus ')"). AddClass ("promoted"); and filter all the list elements, select the specified brand, add class name promoted} return false; return false is to otherwise hyperlink open new Page});
The effect of execution is as follows