.style2 の ID を持つテーブル セルを非表示にする jquery コードを次に示します。
$('#myRadioButtonList').change(function() {
if ($(this).attr('checked') == true && $(this).val() == "HB") {
$('.style2').hide("slow");
};
});
ここに私のラジオボタンリストがあります
<asp:RadioButtonList ID="myRadioButtonList" runat="server">
<asp:ListItem Selected="True" Value="HB">None</asp:ListItem>
<asp:ListItem Value="HOBSKS">Service </asp:ListItem>
<asp:ListItem Value="OBAKS">Open Service</asp:ListItem>
<asp:ListItem Value="BBKS">Close Service</asp:ListItem>
</asp:RadioButtonList>
私はこのトピックに触発されました
JQuery と RadioButton を使用してテーブルの行を非表示/表示する
このように私のjqueryは機能していません。一部に間違いがあります
if ($(this).attr('checked') == true && $(this).val() == "HB")
上記の 2 つの条件を単独で試しましたが、どちらも機能していません。ラジオボタンに到達する必要がありますが、できないようです。次に、コードを機能させるためにその部分をどのように記述すればよいですか。
ありがとう。