Compare two elements with jQuery
This isn’t enough and will return false:
$(“div#test”) == $(“div#test”)
But this will do the trick:
$(“div#test”)[0] == $(“div#test”)[0]
Written by Lucas Pinto
Related protips
Have a fresh tip? Share with Coderwall community!
Post
Post a tip
Best
#N
Authors
Related Tags
#n
Sponsored by #native_company# — Learn More
#native_title#
#native_desc#