jQuery UI: TypeError: $(…).accordion is not a function

前端 未结 4 1361
予麋鹿
予麋鹿 2021-02-18 21:00

For some reason the jQuery UI Accordion does not work. I keep getting this error:

TypeError: $(...).accordion is not a function

4条回答
  •  盖世英雄少女心
    2021-02-18 21:48

    This problem could arise from a couple of different things:

    • You are not including jQuery UI library.
    • You are including jQuery UI library above the inclusion of jQuery library
    • The path to jQuery UI and jQuery libraries might be incorrect
    • You are using a custom jQuery UI library that does not have an accordion

    Since the first two do not apply to you, I would recommend triple-checking the path and using a full jQuery UI library instead of the custom one:

    
    

提交回复
热议问题