TypeError: $(…).modal is not a function with bootstrap Modal

前端 未结 14 1883

I have a bootstrap 2.32 modal which I am trying to dynamically insert into the HTML of another view. I\'m working with Codeigniter 2.1. Following Dynamically inserting a boo

14条回答
  •  南方客
    南方客 (楼主)
    2020-11-29 04:52

    After linking up your jquery and bootstrap write your code just below the Script tags of jquery and bootstrap.

    $(document).ready(function($) {
      $("#div").on("click", "a", function(event) {
        event.preventDefault();
        jQuery.noConflict();
        $('#myModal').modal('show');
    
      });
    });
    
    
    
    
    

提交回复
热议问题