Don P
Don P

Reputation: 63607

Rails: jQuery-UI vs bootstrap

I've been using Twitter Bootstrap. Now I need some features of jQuery UI and there is a handy gem jquery-ui-rails: https://github.com/joliss/jquery-ui-rails.

How can I make sure Bootstrap always has priority over JS functions & CSS also defined in jQuery UI, for example ".tooltip()"?

If I have to download and manually add jquery-ui files, I can do this, but if there is a clean way to make Bootstrap take priority, it would be preferable.

Upvotes: 0

Views: 673

Answers (2)

Inkling
Inkling

Reputation: 3782

I know this is probably a bit late, but it may be worth checking out jQuery UI Bootstrap. You probably want to use the masterbs3 branch if using Bootstrap 3, though it's apparently still in alpha.

Upvotes: 1

cortex
cortex

Reputation: 5206

Make sure to add bootstrap after jQuery in your manifest files or when included directly in the layout. For example:

application.css

/*
*= require jquery-ui
*= require bootstrap
*/

layout

= stylesheet_link_tag 'jquery-ui', 'bootstrap'

PS: This is true at least for CSS, not sure for JS.

Upvotes: 0

Related Questions