How can I check the existence of an element in jQuery?
Currently snip of my code looks like this:
if ($(selector).length>0) {
// This should do something
}
Is there some kind of function, or a plugin that could work with this? Is there any better way to approach this?