jquery is child of

JavaScript
if($(target).parents('.wrapper').length > 0) {
   //do something...
}
Source

Also in JavaScript: