bootstrap multiselect : TypeError: $(…).multiselect is not a function

后端 未结 7 992
半阙折子戏
半阙折子戏 2020-12-20 15:19

I want to use the bootstrap multi select plugin : Bootstrap Multiselect

but it is not working for me.



        
7条回答
  •  鱼传尺愫
    2020-12-20 15:28

    The same problem, and I got it working when I changed the layout, adding a versions at the end: Changes. By default it was:

    @Scripts.Render("~/bundles/jquery")
    @Scripts.Render("~/bundles/bootstrap")
    

    My version of jquery is 3.4.1:

    @Scripts.Render("~/bundles/jquery-3.4.1.min")
    @Scripts.Render("~/bundles/bootstrap.min")
    

    Code inside view page is default:

        @* Include Twitter Bootstrap and jQuery: *@
        
        
        
    
        @* Include the plugin's CSS and JS: *@
        
        
    
        @* Initialize the plugin: *@
        
    

    ps without the Layout it work properly right out from example

提交回复
热议问题