Reputation:
I have a div with an id and I also have a piece of jQuery code to detect if the relatedTarget's id does not match the divs id. This itself works fine, but I also don't want it to match any children of said div either.
The HTML is similar as follows...
<div id="a">
<div id="b">
<img src="..." />
</div>
</div>
The jQuery code is similar as follows...
if(e.relatedTarget.prop('id') != 'a') {
Of course the if statement will return true if the relatedTarget points to children of div#a which is not what I want.
Any ideas how I would go about fixing this? Thanks.
Upvotes: 0
Views: 43