jquery check if this has child p code example Example: check if element has childs jquery if ( $('#myfav').children().length > 0 ) { // do something }