title: Get elements eq() index
body: <p>Let's say I have unknown number of div elements inside parent element. When I click on <strong>child</strong> div element I want to print out its <code>eq()</code> index using <code>console.log()</code>.
  I don't want to use any classes or ids.</p>
  
  <p>HTML:</p>
  
  <pre><code> &lt;div id="parent"&gt;
      &lt;div&gt;&lt;/div&gt;&lt;!--if I click on this element eq() should be 0--&gt;
      &lt;div&gt;&lt;/div&gt;
      &lt;div&gt;&lt;/div&gt;&lt;!--if I click on this element eq() should be 2--&gt;
      &lt;div&gt;&lt;/div&gt;
      &lt;div&gt;&lt;/div&gt;
  &lt;/div&gt;
  </code></pre>
  
  <p>JS:</p>
  
  <pre><code>$(this).click(
      function(){
          console.log(eqIndex);//now this div eq is a problem
      }
  );
  </code></pre>
  
  <p>CSS:</p>
  
  <pre><code>#parent div{
      height: 10px;
      width: 10px;
      background-color:blue;
      margin:2px;
  }
  </code></pre>
  
  <p><a href="https://jsfiddle.net/ccybgmn8/5/" rel="nofollow">DEMO</a></p>