Jquery if element exists

If the element exists

if ( $( "#myDiv" ).length ) {
 
    $( "#myDiv" ).show();
 
}
Comments