Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Bootstrap: 'TypeError undefined is not a function'/'has no method 'tab'' when using bootstrap-tabs

I'm building a little site at the moment and wanted to use some of the Bootstrap parts from Initialzr, specifically the tabs. I've currently tried using the example code provided by the Bootstrap project (http://twitter.github.com/bootstrap/javascript.html#tabs) and a few tweaks but get 'undefined is not a function' on load.

The JS files are preloaded in the right order (jQuery, libs/bootstrap/*, my script.js file/the script mixed in the html), standard jQuery commands (hide etc) all work fine so it doesn't appear to be related to the noConflict() option.

What else do I need to check?

like image 674
Nicholas Smith Avatar asked Feb 10 '12 11:02

Nicholas Smith


1 Answers

This can also be caused if you include bootstrap.js before jquery.js.

Others might have the same problem I did.

Include jQuery before bootstrap.

like image 75
Alan Whitelaw Avatar answered Sep 30 '22 17:09

Alan Whitelaw