Page 1 of 1

SizzleJs. Another selector library from Jquery Projects

PostPosted: Tue Jun 08, 2010 5:08 am
by shameem
Hi,

Sizzle is a collection of regular expressions to be used for finding or filtering HTML elements.

example:
* Sizzle (‘li:nth-child(3)’) // selects li elements which are third child within their list
* Sizzle (‘li:nth-child(odd)’) // selects all odd element within a list (‘even’ works the same way)
* Sizzle (‘li:nth-child(3n)’) // slelects every third li element
* Sizzle (‘li:nth-child(3n+1′) // selects the element after the third li element

* Sizzle (‘:option:not(:selected)’) // selects all unselected option elements
* Sizzle (’select[name=list] :not(:selected)’) // selects all unselected options within the select element named ‘list’
* Sizzle (’select[name=list] :not(:selected):contains(hello)’) // selects all unselected options that contains the text ‘hello’ within the select element named ‘list’

Hope this help you for making Rich Internet Application.