The code below shows an example of how to select children elements and descendant elements in jQuery.
The Code
1 2 3 |
$(this).children().removeClass(); //removes class current from all child elements (one level down) $(this).find().removeClass(); //removes class current from all descendant elements (children, grandchildren, and beyond) |