Issue
When targeting the current node, you can do event="function(this)"
to tell the function you are dealing with this node. How can you get the node that the current element is in?
<div>
<span event="function(this)">Click here</span>
</div>
I want to deal with the div
, not the span
. The current code deals with the span
.
Solution
Each DOM Node has a parentNode
property for that.
Answered By - Bergi Answer Checked By - Dawn Plyler (PHPFixing Volunteer)
0 Comments:
Post a Comment
Note: Only a member of this blog may post a comment.