How to open a Bootstrap modal window using jQuery?

后端 未结 15 1904
闹比i
闹比i 2020-11-22 06:46

I\'m using Twitter Bootstrap modal window functionality. When someone clicks submit on my form, I want to show the modal window upon clicking the \"submit button\" in the fo

15条回答
  •  旧时难觅i
    2020-11-22 07:37

    Try

    $("#myModal").modal("toggle")
    

    To open or close the modal with id myModal.

    If the above is not working then it means bootstrap.js has been overridden by some other js file. Here is a solution

    1:- Move bootstrap.js to the bottom so that it will override other js files.

    2:- Make sure the order is like below

    
    
    
    

提交回复
热议问题