Get content id (greatest) by clicking button on it Jquery
<p>I need to get comment id when clicking to report button (I want to get comment-6)
Now when I click 'report' it show a modal box with form.</p>

<pre><code>    &lt;div class="comment-box medium-comment" id="comment-6"&gt;
        &lt;div class="photo-box"&gt;
        &lt;img src="img/samples/photo_1.jpg" alt="" class="photo rounded"/&gt;
        &lt;a href="#" title="" class="corner rounded"&gt;&lt;/a&gt;
        &lt;/div&gt;
        &lt;div class="avatars"&gt;
        &lt;a href="#" title=""&gt;
            &lt;img src="img/samples/followers/1.jpg" alt=""/&gt;dearskye
        &lt;/a&gt;
        &lt;span&gt;commented on&lt;/span&gt;
        &lt;a href="#" title=""&gt;
            &lt;img src="img/samples/followers/2.jpg" alt=""/&gt;Antony12
        &lt;/a&gt;
        &lt;/div&gt;
        &lt;div class="comment rounded"&gt;
        &lt;div class="bg-tl"&gt;&lt;/div&gt;
        &lt;div class="text"&gt;Happy golden days of yore
                  Happy golden days of yore Happy golden days 
             of yore&lt;/div&gt;
        &lt;div class="buttons"&gt;
           &lt;a href="#" title="" class="report"&gt;REPORT&lt;/a&gt;
        &lt;/div&gt;
        &lt;/div&gt;
        &lt;div class="cinfo"&gt;
        2 дня назад
        &lt;/div&gt;
        &lt;div class="both"&gt;&lt;/div&gt;
    &lt;/div&gt;
</code></pre>

<p>clicking to   </p>

<pre><code>&lt;a href="#" title="" class="report"&gt;REPORT&lt;/a&gt;
</code></pre>

<p>call jquery</p>

<pre><code>jQuery('a.report').bind('click', function(event) {
    showModalWindow('report-window');
});
</code></pre>

<p>and function is </p>

<pre><code>function checkReportForm(form)
{
var result=true;
var select=jQuery("#report-window select");
var textarea=jQuery("#report-window textarea");

if(textarea.hasClass('default'))
{
    //Save placeholder
    textarea.data('placeholder', textarea.text());
    textarea.toggleClass('default');
}
textarea.attr('class','rounded');

if(select.val()==0)
{
if(textarea.val()==''||textarea.val()==textarea.data('placeholder'))
{
    result=false;
    textarea.toggleClass("alert");
}
}
if(result)
{
closeModalWindow('report-window');
}
</code></pre>

<p>I tried to do it but nothing. I suppose it is possible otherwise will think to change code. I hope someone will help me.</p>
