Bootstrap modal: is not a function

后端 未结 13 2225
滥情空心
滥情空心 2020-12-02 17:45

I have a modal in my page. When I try to call it when the windows load, it prints an error to the console that says :

$(...).modal is not a function
         


        
13条回答
  •  余生分开走
    2020-12-02 18:25

    You have an issue in scripts order. Load them in this order:

    
    
    
    
    
    
    

    Why this? Because Bootstrap JS depends on jQuery:

    Plugin dependencies

    Some plugins and CSS components depend on other plugins. If you include plugins individually, make sure to check for these dependencies in the docs. Also note that all plugins depend on jQuery (this means jQuery must be included before the plugin files).

提交回复
热议问题