jquery if find exists code example
Example 1: jquery check if element exists
// Check if an element currently exists
if ($('#element').length) {
}
Example 2: jQuery exists function
if ($("#myElementID").length){
//I exist
}
// Check if an element currently exists
if ($('#element').length) {
}
if ($("#myElementID").length){
//I exist
}