Show nth:div 1, when i click nth: anchor
<p>Good Evening helpful people of stackoverflow,</p>

<p>I want to hide the **clicked ** <code>.project-tile-normal</code> and show the appropriate description div <code>.detail-tile</code>.</p>

<p>I read through some articles regarding my question, but i run into a logical brickwall in my head. Needlessly to say, i'm a beginner in jquery and maybe there is a better way to do that, i just didn't find it.</p>

<p>Here's what i found so far as "answers":<br>
<a href="https://stackoverflow.com/questions/17035337/jquery-hide-children-show-nth-child">Hide Children, Show nth Child</a> - <em>the closest answer to my question</em><br>
<a href="https://stackoverflow.com/questions/11213457/show-and-hide-several-divs-when-clicking-on-links">Show and Hide Several Links</a> - <em>this solution makes my head dizzy</em></p>

<p>My HTML consists of two rows of divs, similar to that simplified representation:</p>

<pre><code>&lt;div class="wrapper"&gt;
 &lt;div class=".project-tile-normal"&gt;some pictures&lt;/div&gt;
 &lt;div class=".project-tile-normal"&gt;&lt;/div&gt;
 &lt;div class=".project-tile-normal"&gt;&lt;/div&gt;

 &lt;div class=".detail-tile"&gt;description&lt;/div&gt;
 &lt;div class=".detail-tile"&gt;&lt;/div&gt;
 &lt;div class=".detail-tile"&gt;&lt;/div&gt;
&lt;/div&gt;
</code></pre>

<p>This is what i have so far coded:</p>

<p><strong>JQUERY</strong></p>

<pre><code>$(document).ready(function(){
 $('.project-tile-normal').on("click", function() {
 if( $(this).hasClass("active") ) {
     $(this).fadeOut(150);
 } else {
   var itemid = '#div' + $(this).attr('target'); // my own try to get the Element of the divs.
   console.log(itemid);
   $(this).addClass("active");
 $(".detail-tile").removeClass("hidden");
 }
});

$('button').on("click", function(){
  $(".detail-tile").addClass("hidden");
  $(".project-tile-normal").fadeIn(150);
  $(".project-tile-normal").removeClass("active");
 });
});//document ready
</code></pre>

<p>Should i put all the Items in an array and then count it out? Thanks for your help in advance.</p>