javascript Mar 29, 2020 Jquery is the instance code that detects the existence of an element if ($(‘#myDiv).length) { // your code } Simple, but not obvious.