How to make these radio buttons in the same <li> exclusive in jQuery?
<pre><code>&lt;li&gt;
&lt;label&gt;&lt;input type="radio" name="radio1" value="1"&gt;radio1&lt;/label&gt;
&lt;label&gt;&lt;input type="radio" name="radio2" value="2"&gt;radio2&lt;/label&gt;
...
&lt;/li&gt;
&lt;li&gt;
....
&lt;/li&gt;
</code></pre>

<p>I tried this but failed:</p>

<pre><code>$('input[type="radio"]').click(function() {
    var $self = $(this);
    $.map($self.parents('li:first').find('input[type="radio"]'),function(n,i){
        if($(n) != $self)$(n).removeAttr('checked');
    });
});
</code></pre>
