.each() function [help]

.each() function [help]

Lets say I have the following html 

  1. <div class="tab"><span class="tab_title">bla 1</span> <span class="status_down">  </span> </div>
  2. <div id="info">
  3. </div> <!-- info -->
  4. <br />
  5. <div class="tab"> <span class="tab_title">bla 2</span> <span class="status_up">  </span> </div>
  6. <div id="info">
  7. </div> <!-- info -->

I`m new to jQuery and new to javascript ... but I have programming background ...

and the following javascript ...


  1. function hideInfo()
  2. {
  3. $('#info').each(function() 
  4. {
  5. $(this).hide();
  6. });
  7. }

all I wanna do here is when page loads hide all info div`s ... this code only hide`s the first one ...