The Content Filter filters the Dom Elements according to the content. Given below the types of content filters :
: contains() Selector
It filters the elements which have the matched text.
It filters the div which have 'Ankit' as text and underline them.: empty Selector
It filters the elements which are empty. Here empty means they don't have children or text.
It filters all the 'td' element which don't have any child or text and fill it with text "Was empty" and change it's background color.
It filters the elements which contains the element provided to ' has() '.
It filters all the 'div' elements which have 'p' (paragraph) inside it and add the css class 'test' to it.
: parent Selector
It selects all the elements that have at least one child including text .
Example : (ContentFilter.html)
Learn from experts! Attend jQuery Training classes.
We have 1000s of tutorials on our website. Search Tutorials tutorials on our website.
Posted on: September 15, 2010 If you enjoyed this post then why not add us on Google+? Add us to your Circles