Better way to find Class in event.target parentnodes using jquery and javascript?
- by Cama
Currently, I check the target of the input box keyup event to see if it is contained within a div wit class "editorRow" using:
var $parentClass = event.target.parentNode.parentNode.parentNode.className;
Is there a better way to do this in case extra markup is added between the div and the span tags?
<div class="editorRow">
…