jQuery Retrieve ID
<p>Hi I have just started to learn jQuerry 3 days ago and today I tryed takeling my first project , an accordeon menu.I have set to each item that needs to show/hide a class of .menu and an id.
While trying to retrive the id's of each element i've used this statement :</p>

<pre><code>var $currentId = $('ul.menu').attr('id');
</code></pre>

<p>Only problem is that it seems this only retrives the id of the first element.Can anyone tell how can I retrive all the It's to store them in a variable.I am planing to use if statements in order to check  for each particular id when it's clicked.Thank You!</p>

<p>EDIT:It seems I was misunderstud what I have to do is this I'l start  from the begining:</p>

<p>Here is my HTML :</p>

<pre><code>&lt;ul id="container"&gt;
    &lt;li class="select"&gt;&lt;a href ="#"&gt;Downloads&lt;/a&gt;&lt;/li&gt;

    &lt;li &gt;
        &lt;ul class = "menu" id="first" &gt;
            &lt;li&gt;
                &lt;a href ="#"&gt;iTunes&lt;/a&gt;
            &lt;/li&gt;
            &lt;li&gt;
                &lt;a href ="#"&gt;iTunes&lt;/a&gt;
            &lt;/li&gt;

        &lt;/ul&gt;
    &lt;/li&gt;
    &lt;li class="select"&gt;
        &lt;a href ="#"&gt;Products List  &lt;/a&gt;
    &lt;/li&gt;
     &lt;li&gt;
         &lt;ul class = "menu" id="second"  &gt;
            &lt;li&gt;
                &lt;a href ="#"&gt;iTunes&lt;/a&gt;
            &lt;/li&gt;

            &lt;li&gt;
                &lt;a href ="#"&gt;iTunes&lt;/a&gt;
            &lt;/li&gt;
        &lt;/ul&gt;
    &lt;/li&gt;
</code></pre>

<p>What I have to do is when i click on the li with class of select I have to make the ul with the class of menu apear.How I wanted to do this to retrive all the id's of the ul.menu and store them in a variable and when I click on any of the li.select the underlying ul should show.</p>
