title: Jquery - using each() to get position of a class element
body: <p>I need to know the position of the "owl-item active", I know that the current position is 2. There are 3 photos in total.</p>
  
  <pre><code>&lt;div style="transform: translate3d(-825px, 0px, 0px); transition: all 0.25s ease 0s; width: 48675px;" class="owl-stage"&gt;
      &lt;div style="width: 825px; margin-right: 0px;" class="owl-item"&gt;
          &lt;div class="gallery-item" style="background-image: url('/image/144/1.jpg');"&gt;&lt;/div&gt;
      &lt;/div&gt;
      &lt;div style="width: 825px; margin-right: 0px;" class="owl-item active"&gt;
          &lt;div class="gallery-item" style="background-image: url('/image/144/2.jpg');"&gt;&lt;/div&gt;
      &lt;/div&gt;
      &lt;div style="width: 825px; margin-right: 0px;" class="owl-item"&gt;
          &lt;div class="gallery-item" style="background-image: url('/image/144/3.jpg');"&gt;&lt;/div&gt;
      &lt;/div&gt;
  &lt;/div&gt;
  </code></pre>
  
  <p>How can I get the position of this "owl-item active" using a Jquery .each() ?</p>
  
  <p>I've this code, but can't find a way to the code tell me that this "owl-item active" is in the position 2.</p>
  
  <pre><code>$('.owl-stage .owl-item').each(function( index, currentElement ) {
      console.log( index+1 );
      //console.log( $(currentElement).find('div.owl-item.active') ); 
  });
  </code></pre>
  
  <p>Can someone give me a clue on how to do this?</p>