is element contains this child of jquery code example
Example 1: check if element has childs jquery
if ( $('#myfav').children().length > 0 ) {
// do something
}
Example 2: jquery is child of
if($(target).parents('.wrapper').length > 0) {
//do something...
}