how to check if an html element exists in jquery code example
Example: check element exist in jquery
if ($('.element').length) {
// there is at least one element matching the selector
}
if ($('.element').length) {
// there is at least one element matching the selector
}