title: Get image attrib inside a div?
body: <p>Say I have this:</p>
  
  <pre><code> &lt;div class='container'&gt;
        &lt;img src='image1' id='1' /&gt;
        &lt;img src='image2' id='2' /&gt;
        ...
   &lt;/div&gt;
   &lt;div class='container'&gt;
   &lt;/div&gt;
  </code></pre>
  
  <p>Now, I when I click on the container, I want to get the id of the image inside it. If the container contains no image, it should pop up an error saying no images in the container. Otherwise, I would like to get a list of all the ids of the images inside.</p>
  
  <p>Using jQuery, I have this:</p>
  
  <pre><code> $('.container').click(function()
   {
        var images = $(this).find('img');
        if( images[0] == null ) { //no image found }
        else
        {
             // No idea what to do here :P
        }
   }
  </code></pre>
  
  <p>could someone please help me out here (I mean inside the else{} statement)? Thanks :)</p>