Bootstrap modal hide is not working

后端 未结 20 1368
温柔的废话
温柔的废话 2020-12-09 08:11

Bootstrap modal hide is not working. Alert comes in else. but my modal is not hidden Added bootply. My issue is the same one.

20条回答
  •  暖寄归人
    2020-12-09 09:01

    I was opening the modal popup when I click on the link using data-toggle="modal" attribute which was bound with that link and trying to close it using javascript but I was failed each time, so when I remove the "data-toggle" attribute and "href" from that link and opened it using javascript then it was closing properly using javascript as well.

    from the below few lines of code, you can understand easily

    Advanced Search

    I changed the above link to something link this

     Advanced Search
    

    After that when I try to close it using javascript, then I become successful

    $("#CustomerAdvancedModal").modal('hide');

提交回复
热议问题