Jquery multi DIVs hide/show
<p>i want to show hide multiple divs with jquery or javascript.
I seached the web but i find codes that must have unique divs
like:</p>

<pre><code>&lt;div id="div1"&gt;text&lt;/div&gt;
&lt;div id="div2"&gt;text&lt;/div&gt;
</code></pre>

<p>and so on, but i want to add the divs in a foreache php function so i can't have multiple IDs,
the foreache is a div wrapper.
So, my question is how can i do that ?</p>

<p>EDIT
Because i am complete noob at JQuery i don't know how to implement anything,
so i have this</p>

<pre><code>    &lt;div id="wrapper"&gt;
  &lt;div class="title"&gt;
     &lt;div class="hide"&gt; Hidden Text&lt;/div&gt;
  &lt;/div&gt;
    &lt;/div&gt;
</code></pre>

<p>When i click the title div, i want the class="hide" to be shown.</p>

<p>Solution:</p>

<pre><code>    .box
{ margin:10px;
  height:auto;
}
.panel,.flip
{
padding:5px;
text-align:center;
background-color:#e5eecc;
border:solid 1px #c3c3c3;
}
.panel
{
padding:50px;
display:none;
}
&lt;/style&gt;
&lt;script src="http://ajax.googleapis.com/ajax/libs/jquery/1.8.0/jquery.min.js"&gt;&lt;/script&gt;
&lt;script type="text/javascript"&gt;
$(document).ready(function(){
  $(".flip").click(function(){
    $(this).next().slideToggle(500);
  });
});
&lt;/script&gt;

&lt;div class="box"&gt;
     &lt;h1&gt;This is the div&lt;/h1&gt;
  &lt;div class="flip"&gt;If u click &lt;/div&gt;
&lt;div class="panel"&gt; This will show&lt;/div&gt;
</code></pre>

<p>
The problem was as i said the div were generated by the foreach function and this solved it, Thanks to all ! I have much to learn.</p>
