I would suspect this to work at first:
if ($(\'#element\') == $(\'#element\')) alert(\'hello\');
But it does not. How does one test if ele
9 years later, without jQuery
If two elements are the same one, two elements must have the same pointer. Thus,
document.body === document.body // true
document.querySelector('div') === document.querySelector('div') // true
document.createElement('div') === document.createElement('div') // false