The use of the "this" keyword is always a bit tricky to wrap your head around, but these two posts helped me to understand things at a fundamental level:
"this" in general javascript : http://www.quirksmode.org/js/this.html and a bit more jQuery specific: http://groups.google.com/group/jquery-en/browse_thread/thread/d670a83c308961d3/92e29565dff28d32 Somebody might be inclined to write this up for the tutorial part too. Regards Angelo On Jul 6, 5:22 pm, "Josh Nathanson" <[EMAIL PROTECTED]> wrote: > If each of your target td's has a class "clicktd"... > > $(".clicktd").click(function() { > $(this).siblings("td:eq(1)").children("div.class").show(); > > }); > > Something close to that should work...someone will jump in and correct me > I'm sure! > > Basically on an event such as click, $(this) will point to whatever was > clicked, so that's the starting point for any DOM traversal that follows. > > -- Josh > > ----- Original Message ----- > From: "Rick Pasotto" <[EMAIL PROTECTED]> > To: "jquery" <jquery-en@googlegroups.com> > Sent: Friday, July 06, 2007 3:35 PM > Subject: [jQuery] tutorial needs additional material > > > In the main tutorialhttp://docs.jquery.com/How_jQuery_Worksthe third > > section is "3. Callbacks, Functions, and 'this'" however there is no > > discussion or even a mention of 'this'. > > > Could someone who understands it help this newbie out? > > > The specific thing I'm trying to figure out is, given a lists of <tr>s > > how can I attach a click() to the first <td> of each <tr> that does a > > show() on a div.class in the third <td> of that <tr>? > > > -- > > "I'll take unequal justice to equal injustice any day." > > Rick Pasotto [EMAIL PROTECTED] http://www.niof.net