Get closest elments of corresponding list of elements in javascript/jquery
<p>I have a list of elements:</p>

<pre><code>var checked_inputs = $('.select-feedback:checked');
</code></pre>

<p>Now i want to get their closest division element whose class is 'MessageRow'. I have done this trick to get it:</p>

<pre><code>    $('.radiusRight').click(function(event) {
    event.preventDefault();
    var feedbacks = new Array();
    var checked_inputs = $('.select-feedback:checked');
    for (var i=0; i&lt;checked_inputs.length; i++) {
        feedbacks.push($(checked_inputs[i]).closest('.messageRow').attr('id'));
    }
    var feedback_ids = feedbacks.map(function(val) { return val.split('-')[1] });
    var feedback_divs = feedbacks.map(function(val) { return '#' + val }).join(',');
    $.ajax({
        url: '/business/feedback/delete/',
        type: 'POST',
        data: {'ids': feedback_ids},
        success: function(data) {
            $(feedback_divs).fadeOut();
        }
    })
})
</code></pre>

<p>Is there any better way to accomplish this? Or is this a good way? Thanks in advance.</p>
