check div exist jquery code example
Example 1: jquery check if element exists
// Check if an element currently exists
if ($('#element').length) {
}
Example 2: jquery check if exist
if ( $( "#myDiv" ).length ) {
$( "#myDiv" ).show();
}
// Check if an element currently exists
if ($('#element').length) {
}
if ( $( "#myDiv" ).length ) {
$( "#myDiv" ).show();
}