when clicking the div hide other divs
<p>when I click the div it will open the subgroups,I want to when opening the current one close the others I wrote a jqquery for this but because I get the class whole divs will hide I want just their children to hide so I should use the id but the Id is not working as I tested here is my function,my div has class named "saheb" and this jquery will hide parents which I don't want I just want to hide children:</p>

<p>UPDATE:I think the solution is here:<code>id="div&lt;?=$row['id']?&gt;"</code> but how to write it?</p>

<pre><code>$(function () {
    $('.saheb').click (function () {
        $('.saheb').not(this).hide();

    });
});
</code></pre>

<p>for my divs I have this code:</p>

<pre><code>&lt;div id="div&lt;?=$row['id']?&gt;" style="display: none;" class="saheb"  &gt;
    &lt;?php 
   $zrows = $db-&gt;fetch_all("SELECT * FROM ugroup WHERE group_id = ".$row['id']);

        if($zrows){
            echo '&lt;ul class="nav-in-ul"&gt;';
            foreach($zrows as $zrow) :
    //*****************************here is where I will show the children
        echo '&lt;li&gt;              
        &lt;input type="hidden" value="'.$zrow['id'].'" name="zid" id="zid" /&gt;
                &lt;a href="javaScript:void(0)" onclick="javaScript:ajaxAction_ques_user('.$row['id'].', '.$zrow['id'].', -1, -1)"&gt;'.$zrow['ugroup'].'&lt;/a&gt;&lt;/li&gt;';

            endforeach; 
            echo '&lt;/ul&gt;&lt;/div&gt;';
        }
    ?&gt;

    &lt;/li&gt;  
</code></pre>
