How to select children or parent elements in jQuery

Bookmark and Share
July 6, 2010 Category: jQuery Tips

Selecting Child or parent elements in jQuery is quite simple and powerful:

// Selecting child elements
$('selector').children('.class-name')
 
// or any other selector like:
$('selector').children('div span')
 
// Selecting the parent element
$('selector').parent()

0 comment so far

Add New Comment




Your Comment