How do I update this to use the latest version of bootstrap?

后端 未结 1 1813
无人及你
无人及你 2021-01-25 23:38

I am interested in the functionality demonstrated in this fiddle for displaying a modal dialog.

the knockout binding is:

/* Custom binding for making mo         


        
相关标签:
1条回答
  • 2021-01-26 00:11

    So there a couple thing wrongs that fix the problem here. First off you have to add a little bit more to the mark up of the actual modal. So add this mark up:

       <div class="modal-dialog">
         <div class="modal-content">
    

    Those were some additions in bootstrap 3 and also hide was removed the modal mark up as well so this section:

    ko.utils.toggleDomNodeCssClass(element, "modal hide fade", true);

    becomes

    ko.utils.toggleDomNodeCssClass(element, "modal fade", true);
    

    Here is a working fiddle:

    http://jsfiddle.net/YT3c5/

    0 讨论(0)
提交回复
热议问题