Looping with jQuery
<p>I have a show and hide function for some divs and more divs need to be added:</p>

<pre><code>    $(document).ready(function() {
    $('[id^=des_]').hide();

    $('.notification, .description span').hover(function() {
        $(this).css('cursor', 'pointer');
    }, function() {
        $(this).css('cursor', 'auto');
    });

    $("#list_01").click(function() {
        $("#des_01").show();
        $("#des_02").hide();

    });

    $("#list_02").click(function() {
        $("#des_02 ").show();
        $('#des_01').hide();
    });

});
</code></pre>

<p>How do I hide all the other divs when one is opened? Can someone help?</p>

<p>Working example is <a href="http://jsfiddle.net/tpWEk/" rel="nofollow">http://jsfiddle.net/tpWEk/</a></p>
