Comparing JQuery objects will never return true, because each JQuery object is a a new object, even if their selectors are equal.
To compare elements, you have to check whether the DOM elements are equal:
this === element.get(0);
Comparing JQuery objects will never return true, because each JQuery object is a a new object, even if their selectors are equal.
To compare elements, you have to check whether the DOM elements are equal:
this === element.get(0);