Is there a Jquery that checks if an element exists?
I have some JSP that has a div.
Then I have a javascript file that is used by all pages. Inside that file I have an ajaxStart that reset the property of the div.
My problem is an error message is shown in the console of the browser that the element don't exist for the pages that don't have div and I don't want it.
Using .length is not an option since it will still display that the element don't exist in the browser's console.