jquery check if function exists 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)
Example 3: jQuery exists function
if ($("#myElementID").length){
//I exist
}