check if function exists jquery code example
Example 1: jquery check if exist
if ( $( "#myDiv" ).length ) {
$( "#myDiv" ).show();
}
Example 2: Is there an “exists” function for jQuery
if ($(selector).length)
if ( $( "#myDiv" ).length ) {
$( "#myDiv" ).show();
}
if ($(selector).length)