Показать модальное всплывающее окно Bootstrap на переключателе Asp.net - PullRequest
0 голосов
/ 30 апреля 2019

Я пытаюсь показать модальное всплывающее окно в списке радиокнопок при каждом нажатии элемента в моем приложении asp.net. Ниже мой код, который я пытаюсь, но он не работает.

<script type="text/javascript">

    $('input[type=radio]:checked').change(function () {

            $('#myModal').modal('show');
     });

</script>

 <asp:RadioButtonList ID="RadioButtonList1" runat="server" RepeatDirection="Horizontal" GROUP = "Blocks" RepeatColumns="10" Name="bn">
        <asp:ListItem>R10S1</asp:ListItem>
        <asp:ListItem>R10S2</asp:ListItem>
        <asp:ListItem>R10S3</asp:ListItem>
   </asp:RadioButtonList>

    <!-- Modal -->
    <div class="modal fade" id="myModal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel">
      <div class="modal-dialog" role="document">
        <div class="modal-content">
          <div class="modal-header">
            <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button>
            <h4 class="modal-title" id="myModalLabel">Incorrect Certificate Information</h4>
          </div>
          <div class="modal-body" style="text-align:center;">
            <p>Please contact Nathan Finch at PPE</p>
          </div>
          <div class="modal-footer">
            <button type="button" class="btn btn-default" data-dismiss="modal">Close</button>
          </div>
        </div>
      </div>
    </div>

Как мне этого добиться?

...