jquery get radiobuttonlist by name dynamically
<p>I have two radiobuttonlist and one checkboxlist on the page. Ideally based on the checkbox selected value, I want to enable/disable corresponding radibuttonlist with jquery function.</p>

<p>But some how $("input[name*=" + columnName + "]") always return null. It can not find the radiobuttonlist by its name? </p>

<pre><code>    $(function() {
        function checkBoxClicked() {

            var isChecked = $(this).is(":checked");
            var columnName = "rblColumn" + $(this).parent().attr("alt");

            if (isChecked) {
                $("input[name*=" + columnName + "]").removeAttr("disabled");
            } else {
                $("input[name*=" + columnName + "]").attr("disabled", "disabled");

                $("input[name*=" + columnName + "] input").each(function() {
                    $(this).attr("checked", "")
                });

            }

        }

        //intercept any check box click event inside the #list Div
        $(":checkbox").click(checkBoxClicked);
    });




&lt;asp:Panel ID="TestPanel" runat="server"&gt;
&lt;asp:CheckBoxList ID = "chkColumn" runat="server" RepeatDirection="Horizontal"&gt;
    &lt;asp:ListItem id = "Column1" runat="server" Text="Column 1" Value="1" alt="1" class="HeadColumn" /&gt;
    &lt;asp:ListItem id = "Column2" runat="server" Text="Column 2" Value="2" alt="2" class="HeadColumn"/&gt;
&lt;/asp:CheckBoxList&gt;

&lt;table&gt;
    &lt;tr&gt;
        &lt;td&gt;
            &lt;asp:RadioButtonList ID = "rblColumn1" runat="server" RepeatDirection="Vertical" disabled="disabled"&gt;
                &lt;asp:ListItem id="liColumn1p" runat="server" /&gt;
                &lt;asp:ListItem id="liColumn1n" runat="server" /&gt;
            &lt;/asp:RadioButtonList&gt;
        &lt;/td&gt;
        &lt;td&gt;
            &lt;asp:RadioButtonList ID = "rblColumn2" runat="server" RepeatDirection="Vertical" disabled="disabled"&gt;
                &lt;asp:ListItem id="liColumn2p" runat="server" /&gt;
                &lt;asp:ListItem id="liColumn2n" runat="server" /&gt;
            &lt;/asp:RadioButtonList&gt;
        &lt;/td&gt;
    &lt;/tr&gt;
&lt;/table&gt;
&lt;/asp:Panel&gt;
</code></pre>

<p>source:</p>

<pre><code>&lt;div id="TestPanel"&gt;

&lt;table id="chkColumn" border="0"&gt;
        &lt;tr&gt;
            &lt;td&gt;&lt;span id="Column1" alt="1" class="HeadColumn"&gt;&lt;input id="chkColumn_0" type="checkbox" name="chkColumn$0" /&gt;&lt;label for="chkColumn_0"&gt;Column 1&lt;/label&gt;&lt;/span&gt;&lt;/td&gt;&lt;td&gt;&lt;span id="Column2" alt="2" class="HeadColumn"&gt;&lt;input id="chkColumn_1" type="checkbox" name="chkColumn$1" /&gt;&lt;label for="chkColumn_1"&gt;Column 2&lt;/label&gt;&lt;/span&gt;&lt;/td&gt;
        &lt;/tr&gt;
    &lt;/table&gt;

&lt;table&gt;
    &lt;tr&gt;
        &lt;td&gt;
            &lt;table id="rblColumn1" class="myRadioButtonList" disabled="disabled" border="0"&gt;
        &lt;tr&gt;
            &lt;td&gt;&lt;span id="liColumn1p"&gt;&lt;input id="rblColumn1_0" type="radio" name="rblColumn1" value="" /&gt;&lt;/span&gt;&lt;/td&gt;
        &lt;/tr&gt;&lt;tr&gt;
            &lt;td&gt;&lt;span id="liColumn1n"&gt;&lt;input id="rblColumn1_1" type="radio" name="rblColumn1" value="" /&gt;&lt;/span&gt;&lt;/td&gt;
        &lt;/tr&gt;
    &lt;/table&gt;
        &lt;/td&gt;
        &lt;td&gt;
            &lt;table id="rblColumn2" class="myRadioButtonList" disabled="disabled" border="0"&gt;
        &lt;tr&gt;
            &lt;td&gt;&lt;span id="liColumn2p"&gt;&lt;input id="rblColumn2_0" type="radio" name="rblColumn2" value="" /&gt;&lt;/span&gt;&lt;/td&gt;
        &lt;/tr&gt;&lt;tr&gt;
            &lt;td&gt;&lt;span id="liColumn2n"&gt;&lt;input id="rblColumn2_1" type="radio" name="rblColumn2" value="" /&gt;&lt;/span&gt;&lt;/td&gt;
        &lt;/tr&gt;
    &lt;/table&gt;
        &lt;/td&gt;
    &lt;/tr&gt;
&lt;/table&gt;

&lt;/div&gt;
</code></pre>
