What I want to do:
( clickedObject === someDiv ) //returns true or false
What I tried
( $(e.target) === $(\'.selector\') ); //r
If you want to match the element that the event is attached to you can use $(this)
, or if you want to find which element triggered the event use $(event.target)
.
Below is an example of both of these.
http://jsfiddle.net/Phunky/TbJef/
Unless you're using event delegation these will be the same though and if there the same element.