Jquery is the instance code that detects the existence of an element
- 2020-03-29 23:51:49
- OfStack
if ($('#myDiv).length) {
// your code
}
Simple, but not obvious.
if ($('#myDiv).length) {
// your code
}
Simple, but not obvious.