HtmlDivElement has no method 'indexOf'
<p>I am attempting to derive some identifying property from this element:</p>

<pre><code>&lt;div class="rtsLevel rtsLevel1"&gt;
  &lt;ul class="rtsUL"&gt;
    &lt;li class="rtsLI rtsFirst rtsLast"&gt;
      &lt;a class="rtsLink rtsSelected" href="#"&gt;
        &lt;span class="rtsOut"&gt;
          &lt;span class="rtsIn"&gt;
            &lt;span class="rtsTxt"&gt;Dashboard&lt;/span&gt;
          &lt;/span&gt;
        &lt;/span&gt;
      &lt;/a&gt;
    &lt;/li&gt;
  &lt;/ul&gt;
&lt;/div&gt;
</code></pre>

<p>using this javascript:</p>

<pre><code>function OnClientDragging(sender, eventArgs) {
    var target = eventArgs.get_htmlElement();
    console.log(target);
    var currentZone = TryGetZoneFromTarget(target);
}

function TryGetZoneFromTarget(target) {
//If the mouse moves too quickly target.id returns a red herring.
if (/\S/.test(target.id) == false) {
    if (target.indexOf("rtsLevel") != -1) {
        return null; //The tabstrip has an invisible div which doesn't have an ID, but isn't a redherring.
    }

    return undefined;
}
</code></pre>

<p>The div doesn't have an id specified, but I don't seem to be able to 'talk' to it at all, either. I've tried '.hasClass("rtsLevel")' and was being told hasClass not defined, so I tried to do a string comparison, but hit the same wall.</p>

<p>What am I doing incorrectly?</p>

<p>EDIT: Solution was <code>if ( $(target).hasClass('rtsLevel') ) {</code></p>
