if($('#parent').children('ul').length){
// your code here
}This code snippet for Check an Element Exist or Not using JQuery.
This code snippet for Check an Element Exist or Not using JQuery.
if($('#parent').children('ul').length){
// your code here
}