Just a quick review of tips available in jQuery to manage nodes (contents) near by the content / node which is triggered an event, like click, hover etc

Functions: find, parent, parents, children, first, last, closest

Suppose you need to manage some nodes nearby a link or a button on an event.

Say $(‘.button’).click(function(){

// code goes here


To get the current parent of triggered element, use $(this).parent()

To get the parent which has a class , use:

To find any other element just above the node, use :

to get the first element in find, use find(‘li:first’)

and for last, use li:last

To get exactly the child nodes, use:

Here comes another very useful function, which is, closest

$(this).closest(‘td’) etc

So, this quick note will be helpful to you