title: show the Div and hide other Div when 'show more' link related to that company is clicked
body: <p>i have 2 divs inside foreach loop .first div has information about a company but shortened form and in second div has full form of information about a company . i want to hide first div and show second div when 'show more ' link of that  company has  clicked .in my code when i click 'show more ' link and it shows  all company not only the company which i clicked .</p>
  
  <pre><code>&lt;?php   
    $X         = 0;
    foreach($companyRows as $row){ ?&gt;
    &lt;div class="first" &gt;
          echo "a company information shortend form"
        &lt;/div&gt;
        &lt;div class="second" style="display:none"&gt;
         echo "a company information full form"
         &lt;/div&gt;
         &lt;a class="show_details"&gt; show more&lt;/a&gt;                               
    &lt;?php $X++;
    } ?&gt;
  </code></pre>
  
  <p>and here is jQuery .  i am new in  jquery and php.</p>
  
  <pre><code>&lt;script type="text/javascript"&gt;
      $(document).ready(function(){
          $(".show_details").click(function(){
              $(".second").show();
              $(".first").hide();
          });
      });
  &lt;/script&gt;
  </code></pre>
  
  <p>and want to change show more link to show less. </p>