Friday, 23 April 2010

JQuery: Select elements containing an attribute

Here's a simply JQuery snippit that will select all elements using the selector which contain a specified attribute...

This will select all table rows (TR's) of a table with an ID of 'tblTest' that have an attribute 'uniqueid'.
$("table#tblTest tr[uniqueid]")

No comments: