2 JS functions with same name conflict

后端 未结 5 1086
野性不改
野性不改 2021-02-15 15:17

Short

Using 2 libraries at same page: jQuery UI and Twitter Bootstrap:

  • jQuery UI very important for me because nearly all UI things built based on it
5条回答
  •  故里飘歌
    2021-02-15 15:47

    If you are only using the dropdown plugin of Twitter Bootstrap, you don't need the .button() plugin.

    Go to the customize bootstrap page and unselect all jQuery plugins, then choose only the dropdown one. You could also unselect some of the CSS if you want.


    If you need both implementations (Twitter Bootstrap and jQuery UI), you could rename all .button to something like .bsButton in the bootstrap-button.js file (or find this section in a non-minified version) - not tested.

提交回复
热议问题