Can I use Twitter Bootstrap and jQuery UI at the same time?

前端 未结 13 829
栀梦
栀梦 2020-11-28 20:48

I am using Twitter Bootstrap and I want to use an \"auto-suggest\" which is not available in Bootstrap, whereas jQuery UI has its own methods for auto-suggest.

Can I

相关标签:
13条回答
  • 2020-11-28 21:17

    The data-role="none" is the key to make them work together. You can apply to the elements you want bootstrap to touch but jquery mobile to ignore. like this input type="text" class="form-control" placeholder="Search" data-role="none"

    0 讨论(0)
  • 2020-11-28 21:20

    If don't store it locally and use the link that they provide you might have an improved performance.The client might have the scripts already cached in some cases. As for the case of jQueryUI i would recommend not loading it until necessary. They are both minimized, but you can fire up the console and look at the network tab and see how long it takes for it to load, once it is initially downloaded it will be cached so you shouldn't worry afterwards.My conclusion would be yes use them both but use a CDN

    0 讨论(0)
  • 2020-11-28 21:20

    I have site developed using jquery ui, I just tried to plug in bootstrap for future development and styling but it breaks virtually everything.

    So No they are not compatible.

    0 讨论(0)
  • 2020-11-28 21:21

    Yes you can use both. js bootstrap from twitter is a collection of jquery plugins. There shohuldn't be any conflict with jQuery UI.

    Regarding bandwidth overload, it really depends on how you handle the requests to load all of your js files. if you really dont want to make multiple requests to the server to request for each file, just append them together and minimize. Or you probably can get rid of some js bootstrap plugins you dont need. it is very modular.

    0 讨论(0)
  • 2020-11-28 21:21

    Kendo UI has a nice bootstrap theme here and a set of web UI comparable to jquery-UI. They also have an open source version that works nicely with the theme.

    0 讨论(0)
  • 2020-11-28 21:27

    Check out jquery-ui-bootstrap. From the README:

    Twitter's Bootstrap was one of my favorite projects to come out of 2011, but having used it regularly it left me wanting two things:

    The ability to work side-by-side with jQuery UI (something which caused a number of widgets to break visually) The ability to theme jQuery UI widgets using Bootstrap styles. Whilst I love jQuery UI, I (like others) find some of the current themes to look a little dated. My hope is that this theme provides a decent alternative for others that feel the same. To clarify, this project doesn't aim or intend to replace Twitter Bootstrap. It merely provides a jQuery UI-compatible theme inspired by Bootstrap's design. It also provides a version of Bootstrap CSS with a few (minor) sections commented out which enable the theme to work along-side it.

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