Bootstrap radio-buttons toggle issue

Bogz902 picture Bogz902 · Nov 5, 2012 · Viewed 21.5k times · Source

I'm trying to turn some regular buttons in radio buttons the twitter bootstrap way (http://twitter.github.com/bootstrap/javascript.html#buttons).

I followed the instructions, but when I press the buttons I get the following error in the console:

Uncaught Error: cannot call methods on button prior to initialization; attempted to call method 'toggle' .

Do you know what might cause it? The buttons are loaded in the page and only become visible when the corresponding content is displayed by AJAX.

Thanks!

Answer

Alexandre Paulo picture Alexandre Paulo · Nov 24, 2012

I had the same problem and it was driving me mad!!!!

Until I found that I was loading bootstrap before jqueryui...

I switched the order and notice that if I load jqueryui BEFORE bootstrap, I have no such problem :)