black friday wordpress

Bootstrap without Tether

Bootstrap without Tether

Bootstrap without Tether, why would you need it?

As a web developer, I’ve always loved Bootstrap. Undoubtedly the most popular UI framework, Bootstrap with its 4.0 version is now more powerful than ever. However, if you are working with Bootstrap v4.0.0-alpha.6, you already know this version comes with two dependencies: jQuery and Tether. While jQuery is expected and certainly needed, we believe Tether should be optional. Optimizing websites for Google search engine, including this one (Jekyll based), we wanted to reduce as much as possible the number of Javascript files the page loads. Removing tether library alone obviously generates a Bootstrap error: Bootstrap tooltips require Tether. What’s the solution then?

How to use Bootstrap without Tether?

Or how to remove the error: Bootstrap tooltips require Tether? This question is often asked on the Internet but most answers don’t really offer the ideal solution.

Bootstrap 4 needs Tether, so you need to include tether.min.js before you include bootstrap.min.js

source: stackoverflow

Yes, this is the logical thing to do when you get this error, but what if we don’t want to add a new Javascript to our load time? First, it’s important to understand why Bootstrap requires Tether library. This way you will know if this solution fits your needs. As you could probably figure out, Bootstrap needs Tether for tooltips. If you don’t know what tooltips are:

bootstrap without tether

So, if you are not planning to use tooltips on your site (or use a different way to integrate them, other than the built-in one), then this solution is right for you. Simply replace your current bootstrap.js file with the file that you can download below. Please, be careful, this is a solution for Bootstrap v4.0.0-alpha.6. If you are interested in a different version of Bootstrap without Tether, let us know in comments and we will add it shortly.

Download Bootstrap without Tether

Download Bootstrap without Tether, a simplified bootstrap.js file that you can safely use in your website without adding tether library, so without getting the dependency error: Bootstrap tooltips require Tether. The source of the .zip file is Github. Make sure you unzip it after the download is complete. You can take a look at the Gist if you want to view the the source first.

Download bootstrap.js View on GithubGist

demo   Mediumish - our most loved WordPress theme
Mediumish Theme