I am trying to grab the first item in a set but none of the examples i have seen on traversing really fit the format I am using. Any help would be greatly appreciated.
function popagateDegreeUpwards(obj, sectionNum, compLev, counter)
{
var ddl = $(obj);
var oneTierUpPnl = ddl.parent('.Section' + (sectionNum - 1));
var parDdls = oneTierUpPnl.find('.DDLSelector' + (sectionNum - 1));
var parDdl = //How do I select the first element in the parDdls Set???
}
Use the
:firstselector. Here’s some documentation: http://api.jquery.com/first-selector/You might use it like so:
You could also use the
.first()call. Docmentation here: http://api.jquery.com/first/Usage example: