title: Count elements before an element
body: <p>here is an example :</p>
  
  <pre><code>&lt;div class="create-q"&gt;&lt;/div&gt;
  &lt;div class="create-q"&gt;&lt;/div&gt;
  &lt;div class="create-q"&gt;&lt;/div&gt;
  &lt;div class="create-q"&gt;&lt;/div&gt; &lt;-- im in this class : I want to know how many div with class "create-q" there is before this one. (3 in this example)
  &lt;div class="create-q"&gt;&lt;/div&gt;
  &lt;div class="create-q"&gt;&lt;/div&gt;
  </code></pre>
  
  <p>I know how to count but not how to stop it once it reach a specified div..</p>
  
  <p>How can I do this with jQuery ?</p>