Can I use twitter bootstrap without jquery?

后端 未结 5 1220
梦毁少年i
梦毁少年i 2020-12-02 16:02

I work in a project where we don\'t use JQuery.

Is twitter bootstrap dependant on it ?

相关标签:
5条回答
  • 2020-12-02 16:48

    Yes you can via Native Javascript for Bootstrap. Enjoy

    0 讨论(0)
  • Bootstrap 5 will be without jQuery dependency. Reference: Concerned PR

    0 讨论(0)
  • 2020-12-02 16:52

    Twitter bootstrap itself isn't jQuery dependant.

    If you use just the CSS part of it, you won't need jQuery.

    If you use the Javascript plugins you need jQuery, since they are jQuery plugins.

    v3: http://getbootstrap.com/javascript/

    v4: https://getbootstrap.com/docs/4.0/getting-started/javascript/

    0 讨论(0)
  • 2020-12-02 16:53

    You do not need to use jQuery. Boostrap will perform better with native JavaScript than jQuery.

    Try one of these:

    1. Bootstrap Native
    2. Bootstrap Native JavaScript
    3. Vue.js
    0 讨论(0)
  • 2020-12-02 16:54

    Short answer is yes but as Bruno says, the jQuery plugins won't work. To workaround this, I made a small replacement script so the dropdown menus, alert boxes and collapsible nav bar will work without jQuery: http://daniemon.com/blog/bootstrap-without-jquery/

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