SizzleJs. Another selector library from Jquery Projects

Programming for Search Engines 101. An area for avid PHP and .NET developers to chat about Programming techniques and how to make better use of search engines.

Moderator: Moderators

SizzleJs. Another selector library from Jquery Projects

Postby shameem » Tue Jun 08, 2010 5:08 am

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.
shameem
 

Return to Programming

Who is online

Users browsing this forum: No registered users and 3 guests