Jonah Jonah - 1 year ago 120
Javascript Question

Test if two elements are the same

I would suspect this to work at first:

if ($('#element') == $('#element')) alert('hello');

But it does not. How does one test if elements are the same?

Answer Source

As of jquery 1.6 you can now simply do:

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download