How to open a Bootstrap modal window using jQuery?

后端 未结 15 2212
闹比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条回答
  •  梦如初夏
    2020-11-22 07:30

    Try to use jQuery instead of $ sign when calling the function, it worked in my case as you can see below.

    jQuery.noConflict(); 
    jQuery('#myModal').modal('show'); 
    

    jQuery.noConflict(); because when jQuery('#myModal').modal('show'); doesn't work, it's caused by having included jQuery twice. Including jQuery 2 times makes modals not to work. and it would resolve the problem in that case, as in my case it is repeating.

    Further you can go to this link

    Bootstrap Model Window Not Showing by Calling Through JQuery

提交回复
热议问题