containing child elements or text: $ ("td: parent ")
5. Visibility Filter
Visibility Filters
Name
Description
Example
: Hidden
Match all invisible elementsNote: In Version 1.3.2, hidden matches its own or parent class elements that do not occupy space in the document. If the CSS visibility attribute is used so that it is not displayed but occupies space, hidden is not entered.
Find all invisible tr elements: $ ("tr: hidden ")
: Visible
Match all v
the id attribute$ ("Input [name = 'newsletter ']") Select the input element whose name attribute is equal to 'newsletter'.$ ("Input [name! = 'Newsletter'] ") Select the input element whose name attribute is not equal to 'newsletter '.$ ("Input [name ^ = 'News']") select all input elements whose name attributes start w
: odd") select elements 1, 3, 5... of all tr elements.$ ("Td: eq (2)") Select the td element whose Sn is 2 from all td elements.$ ("Td: gt (4)") Select All td elements whose serial number is greater than 4 in the td Element$ ("Td: ll (4)") Select All td elements whose serial number is less than 4 in the td Element$ (": Header ")$ ("Div: animated ")Content Filter selector:$ ("Div: contains ('john')") select all elements whose div contains John text.$ ("Td: empty") Select an array of all td elemen
FilterVisibility Filters
Name
Description
Example
: Hidden
Match all the Invisible elementsNote: In the 1.3.2 release, hidden matches an element that itself or the parent does not occupy space in the document. If you use the CSS visibility property so that it does not display but occupies a placeholder, you do not enter hidden.
Find all the Invisible TR elements: $ ("Tr:hidden")
: Visible
Match all visible elements
Find
elementsFind the Hidden TRHTML 代码:JQuery Code: $ ("Tr:hidden")结果:[ Code parsing: Tr:hidden, is to find the TR element that is hidden in the file. The result will be found value 1You can also find that the attribute is an element of hidden. The code is written ibid.AttributeMatches the element that contains the given property. Note that in jquery 1.3, the leading @ symbol has been abolished! If you want to be compatible with the latest version, simply remove the @ symbol.Find all DIV elements th
all empty elements that do not contain child elements or text: $ ("td: empty ")
: Has (selector)
Matches the element containing the element matched by the selector.
Add a text class to all p elements that contain p: $ ("p: has (p)"). addClass ("test ");
: Parent
Match an element containing child elements or text
Find all td elements containing child elements or text: $ ("td: parent ")
6. Visibility filter Visibility Filters
: Hidden
: Visible
7. Attribute f
the Javascript part. It is very easy to integrate into spring. Change your web concept from now on!
I saw some of IBM's Ajax technologies on my website.
Article For more information, see !!!
1, http://www-128.ibm.com/developerworks/cn/xml/wa-ajaxintro2/index.html? CA = dwcn-newsletter-XML
2, http://www-128.ibm.com/developerworks/cn/xml/wa-ajaxintro3/index.html? CA = dwcn-newsletter-XML
3, http://www-128.i
")
4. Visibility filter
Name
Description
Example
: Hidden
Match all the Invisible elementsNote: In the 1.3.2 release, hidden matches an element that itself or the parent does not occupy space in the document. If you use the CSS visibility property so that it does not display but occupies a placeholder, you do not enter hidden.
Find all the Invisible TR elements: $ ("Tr:hidden")
: Visible
Match all visible elements
the visual div element properties of the filter selector: $ ("Div[id]"Select all DIV elements that contain the id attribute $ ("Input[name= ' newsletter ')" selects all the name attributes equal to ' newsletter 'the INPUT element $ ("input[name!= ' newsletter ')" selects all name attributes not equal to ' newsletter '
$ ("Div:contains (' John ')") Select all the elements in the div that contain the John text$ ("Td:empty") Select all the arrays of TD elements that are empty (nor include text nodes)$ ("Div:has (P)") Select all DIV elements that contain p tags$ ("td:parent") Select all the element array with TD as parent node
5. Visual Filter Selector
$ ("Div:hidden") Select all the hidden div elements$ ("div:visible") Select all of the visual DIV elements
6. Attribute Filter Selecto
1 $ ("input[name= ' newsletter ')") Select all the name attribute equals ' newsletter ' of the input element 2 $ ("input[ name!= ' newsletter ') Select all the name attribute is not equal to ' newsletter ' of the input element 3 $ ("input[name^= ' News ']") Select all the name attributes to start with
Visible TR elements: $ ("tr:visible")
6. Attribute FilterAttribute Filters
Name
Description
Example
[Attribute]
Match the element containing the given property
Find all DIV elements containing ID attributes: $ ("div[id]")
[Attribute=value]
Matches a given property as an element of a particular value
Find all the name attribute is the INPUT element of newsletter: $ ("in
div elementsPanax Notoginseng attribute Filter Selector: - the$ ("Div[id")Select all DIV elements that contain the id attribute +$ ("input[name= ' newsletter ')" selects all the name attributes equal to ' newsletter 'the INPUT element A the$ ("input[name!= ' newsletter ')" selects all name attributes not equal to ' newsl
visualized div elementsAttribute filter selector:$ ("Div [id]") Select All div elements containing the id attribute$ ("Input [name = 'newsletter ']") Select the input element whose name attribute is equal to 'newsletter'.$ ("Input [name! = 'Newsletter'] ") Select the input element whose name attribute is not equal to 'newsle
attribute.
Find all div elements containing the id attribute:$ ("Div [id]")
[Attribute = value]
Matching a given attribute is an element of a specific value
Find all the input elements whose name attribute is newsletter:$ ("Input [name = 'newsletter ']"). attr ("checked", true );
[Attribute! = Value]
Matching a given attribute is an element that does not contain a specific val
the id attribute$ ("Input [name = 'newsletter ']") Select the input element whose name attribute is equal to 'newsletter'.$ ("Input [name! = 'Newsletter'] ") Select the input element whose name attribute is not equal to 'newsletter '.$ ("Input [name ^ = 'News']") select all input elements whose name attributes start w
contain the John text$ ("Td:empty") Select all the arrays of TD elements that are empty (nor include text nodes)$ ("Div:has (P)") Select all DIV elements that contain p tags$ ("td:parent") Select all the element array with TD as parent nodeVisual Filter Selector:$ ("Div:hidden") Select all the hidden div elements$ ("div:visible") Select all of the visual DIV elementsAttribute Filter Selector:$ ("Div[id]") Select all DIV elements that contain the id attribute$ ("input[name= '
= ' newsletter ')" To select all the name attribute equals ' newsletter ' of the INPUT element $ ("input[name! = ' Newsletter ') Select all the name attribute is not equal to ' newsletter ' of the INPUT element $ ("input[name^= ' News") Select all the name attribute with ' news ' beginning with the INPUT element $ ("in
name attribute is newsletter:$ ("Input [name = 'newsletter ']"). attr ("checked", true );
[Attribute! = Value]
Matching a given attribute is an element that does not contain a specific value
Find all input elements whose name attribute is not newsletter:$ ("Input [name! = 'Newsletter '] "). attr (" chec
number is less than 4 in the td Element
$ (": Header ")
$ ("Div: animated ")
Content Filter selector:
$ ("Div: contains ('john')") select all elements whose div contains John text.
$ ("Td: empty") Select an array of all td elements that are empty (or contain text nodes)
$ ("Div: has (p)") Select All div elements containing the p tag
$ ("Td: parent") Select All element arrays with td as the parent node
Visual filter selector:
$ ("Div: hidden") select all the div elements to be hidden.
$ ("Div: v
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.