Using jQuery 'this' with a selector of multiple elements
<p>Sorry jQuery noob question here, I am attempting to make all of the div elements with the class .thumbnail clickable with a callback function. But, once one of the div(s) of that class is clicked I need the specific ID of that given div so I can do further manipulation to that specific one.  I am confused if I would use 'this' to reference that specific div once it is clicked or if I am looking at this the wrong way.</p>

<p>Im sure this is a very simple question for you jQuery gurus to answer, its been a long day and my brain is completely zombified.</p>

<p>Example Sudo Code:</p>

<pre><code>&lt;script&gt;
$(document).ready(function() {

    $(".thumbnail").click(function() {

        //need to get id of thumbnail that was clicked, this is where I am confused       
        var thumbnail_id = $(this).attr('id')
        alert(thumbnail_id);

     });

});

&lt;/script&gt;

&lt;div class=thumbnail" id="1"&gt;Tom&lt;/div&gt;
&lt;div class=thumbnail" id="2"&gt;Jerry&lt;/div&gt;
&lt;div class=thumbnail" id="3"&gt;Sue&lt;/div&gt;
&lt;div class=thumbnail" id="4"&gt;Mary&lt;/div&gt;
&lt;div class=thumbnail" id="5"&gt;Brian&lt;/div&gt;
</code></pre>
