Sprawdź, czy element ma JQuery Childs
if ( $('#myfav').children().length > 0 ) {
// do something
}
Enthusiastic Echidna
if ( $('#myfav').children().length > 0 ) {
// do something
}