Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Can I use tagit with twitter bootstrap?

I'm trying to integerate tagit with twitter bootstrap's typeahead functionality.

I know that tagit relies on the jquery UI for autocomplete etc. Is it possible to use twitters bootstrap instead?

Basically all I want from tagit is to let the user quickly click and remove items from a list but would prefer not to introduce another java script library on my site

like image 338
Paul Avatar asked Mar 28 '12 22:03

Paul


2 Answers

Tagit is nice and I haven't found a suitable replacement. The good news is, you don't need all of Jquery-UI and you can style the tag input yourself to look alright with Bootstrap.

SCSS:

ul.tagit {
  margin-left: 0;
  input { @include box-shadow(none); }
}

CSS:

ul.tagit {
  margin-left: 0;
}
ul.tagit input { 
     -webkit-box-shadow: none;
     -moz-box-shadow: none;
     box-shadow: none;
}
like image 150
jasongarber Avatar answered Oct 31 '22 03:10

jasongarber


Made a small example, that is working, although ugly a bit. I'm not actually much good in CSS styling, so, hopefully, you'll make improvements to this example to make it completely fine.

like image 43
weekens Avatar answered Oct 31 '22 05:10

weekens