Does Bootstrap or Foundations Require jQuery?

Posted in Articles

Tweet This Share on Facebook Bookmark on Delicious Digg this Submit to Reddit

The short answer is “yes”, bootstrap and foundations both require jQuery — one a little more than the other.  However, in both cases it is sometimes possible to get away without using jQuery provided that you limit some functionality.

For bootstrap 3, all of the Javascript components require jQuery.  But if you are using Bootstrap for its CSS only (such as using its grid system) without using any of its components, then you do not need jQuery.

For Foundations 4, it will work with either jQuery or Zepto.  The problem is that Zepto does not support any version of Internet Explorer.  But if your web app is only intended for mobile phones (which doesn’t use Internet Explorer), then you are fine to go with just Zepto.

Most likely, you will want your app to work on desktop browsers, in which case, you will use Zepto by default and fallback to jQuery when IE is detected.  Zepto recommend this script for doing the detection and fallback…

document.write('<script src=' +
('__proto__' in {} ? 'zepto' : 'jquery') +

Because IE 10 no longer support conditional comments.