You are browsing the dom tag archive.

jQuery: Identifying selectors, that represent the same DOM node.

If you have two jQuery selectors, that each represent a single DOM node, and you need to know whether it is the same DOM node, you can easily do this with: var selector1 = $(‘#some_item’); var selector2 = $(‘#some_item’); if (selector1[0] == selector2[0]) { // Do stuff if the selectors represent the same DOM node […]

1 Star2 Stars3 Stars4 Stars5 Stars (3 votes, average: 3.67 out of 5)