jquery elements by class
<p>Hi there 
im trying to get all dropdown lists by class and change their names, my code is not working, is there something i am missing?</p>

<p>$(document).ready(function () {</p>

<pre><code>$('.mutuallyexclusive').live("click", function () {

    checkedState = $(this).attr('checked');
    $('.mutuallyexclusive:checked').each(function () {
        $(this).attr('checked', false);
        $(this).attr('name', 'chk');
    });
    $(this).attr('checked', checkedState);

    if (checkedState) {
        var prev = $(this).prev('select').attr("name", 'cat.parent_id');


        elements = $('select.selected');
        elements.each(function () { $(this).attr("name", "bbb"); });




    }
    else {
        var prev = $(this).prev('select').attr("name", 'dd');
    }

});
</code></pre>

<p>}); </p>
