title: Get element index using class and subclass
body: <p>I've been trying to get the index of a TR element which has two class the first one identify it like a group and the second one as a sub-group, then I try to get the index of a specific group and subgroup it returns me -1... Does anyone know what am I doing wrong?</p>
  
  <p>Here is an example: </p>
  
  <pre><code>&lt;script src="https://ajax.googleapis.com/ajax/libs/jquery/1.12.4/jquery.min.js"&gt;&lt;/script&gt;
  &lt;table&gt;
      &lt;tr class="trusure1 trrstatusC"&gt;&lt;/tr&gt;
      &lt;tr class="trusure2 trrstatusC"&gt;&lt;/tr&gt;
      &lt;tr class="trusure2 trrstatusC"&gt;&lt;/tr&gt;
      &lt;tr class="trusure2 trrstatusR"&gt;&lt;/tr&gt;
      &lt;tr class="trusure2 trrstatusR"&gt;&lt;/tr&gt;
      &lt;tr class="trusure3 trrstatusC"&gt;&lt;/tr&gt;
      &lt;tr class="trusure3 trrstatusC"&gt;&lt;/tr&gt;
  &lt;/table&gt;
  &lt;div id="console"&gt;&lt;/div&gt;
      &lt;script&gt;
      $('#console').append('&lt;br&gt; The tr with the class trusure2 and the lastest with class trrstatusR is on the position '+$('tr.trusure2.trrstatusR:last-child').index());
  &lt;script&gt;
  </code></pre>
  
  <p><a href="https://jsfiddle.net/nod9xbsh/" rel="nofollow">https://jsfiddle.net/nod9xbsh/</a></p>
  
  <p>Thank you!!</p>