Check an Element Exist or Not using JQuery

  1. if($('#parent').children('ul').length){  
  2.     // your code here