jQuery: The Write Less, Do More JavaScript Library

 « Return to Thread: Selector Syntax, new to jQuery

Re: Selector Syntax, new to jQuery

by NauticalMac :: Rate this Message:

Reply to Author | View in Thread


Answering my own question.
Missed the optional 'context' parameter on the basic jQuery command.
Works as advertised/expected.


On Jul 2, 6:39 am, NauticalMac <cmcnau...@...> wrote:
> Starting to use jQuery having read 'jQuery in Action'.
> Came across the following sysntax for sortable tables:
>   $('table.sortable').each(function()   {
>     var $table = $(this);
>     $('th', $table).each(function(column)       .....
>
> Clearly the $('th', $table).each syntax results in traversing 'th'
> elements that are descendants of each of the 'table.sortable'
> elements.  I'm missing where this syntax is documented and explained.

 « Return to Thread: Selector Syntax, new to jQuery