I always wondered why jQuery returns true if I\'m trying to find elements by id selector that doesnt exist in the DOM structure.
Like this:
You could check the .length property of the jQuery object. Like this:
.length
if($("#two").length > 0) { // exists... } else { // doesn't exist }