Better way to find Class in event.target parentnodes using jquery and javascript?
<p>Currently, I check the target of the input box keyup event to see if it is contained within a div wit class "editorRow" using:</p>

<p>var $parentClass = event.target.parentNode.parentNode.parentNode.className;</p>

<p>Is there a better way to do this in case extra markup is added between the div and the span tags?</p>

<pre><code>  &lt;div class="editorRow"&gt;
     &lt;li&gt;
       &lt;span class="wi1"&gt;
          &lt;input type="text" value="" style="width: 80px;" name="LineItems9"  id="LineItems_9"&gt;
       &lt;/span&gt;
     &lt;/li&gt;  
   &lt;/div&gt;
</code></pre>

<p>&nbsp;  </p>

<pre><code>$("input").live("keyup", function(event) {

    return GiveDynamicFieldsLife(event);

});

function GiveDynamicFieldsLife(event) {

    **var $parentClass = event.target.parentNode.parentNode.parentNode.className;**

    if ($parentClass == "editorRow") {
    //Do Stuff
    }
}
</code></pre>
