Adding jQuery and Bootstrap to Write a Mobile-Friendly and Responsive Web Application

In Part 1 of this series, we set up a basic HTML 5 project using Netbeans as our IDE, and we also presented a few elements that have been added in this new specification of the language.

Create Mobile-Friendly Responsive Websites
Create Mobile-Friendly Responsive Websites – Part 2

In few words, you can think of jQuery as a cross-browser and cross-platform Javascript library that can greatly simplify client-side scripting in HTML pages. On the other hand, Bootstrap can be described as a complete framework that integrates HTML, CSS, and Javascript tools to create mobile-friendly and responsive web pages.

In this article we will introduce you to jQuery and Bootstrap, two priceless utilities to write HTML 5 code more easily. Both jQuery and Bootstrap are licensed under the MIT and Apache 2.0 licenses, which are compatible with the GPL and are thus free software.

Please note that basic HTML, CSS, and Javascript concepts are not covered in any article of this series. If you feel you need to get up to speed with this topics first before proceeding, I highly recommend the HTML 5 tutorial in W3Schools.

Incorporating jQuery and Bootstrap into Our Project

To download jQuery, go to the project’s web site at and click on the button that displays the notice for the latest stable version.

At the time of this writing it’s v1.11.3 for full-browser compatibility (including Internet Explorer versions 6, 7, and 8) or v2.1.4 if you’re sure that your visitors will not be using those versions of IE.

We will go with this second option in this guide. DO NOT click on the download link yet (the following illustration is only meant to indicate which is the right option).

Download JQuery
Download JQuery

You will notice that you can download either a compressed .min.js or an uncompressed .js version of jQuery. The first is meant specially for websites and helps reduce the load time of pages (and thus Google will rank your site better), while the second is targeted mostly at coders for development purposes.

For the sake of brevity and easiness of use, we will download the compressed (also known as minified) version to the scripts folder inside our site structure.

Right click on the link for the compressed, production version and choose Save Link As…, and then navigate to the indicated directory (you may want to refer to the path indicated where we chose to save our project in Part 1).

Finally, click Save on the bottom of the current dialog:

Save jQuery
Save jQuery

Now it’s time to add Bootstrap to our project. Go to and click on Download Bootstrap. On the next page, click on the highlighted option as indicated below to download the minified components, ready to use, in a zip file:

Download Bootstrap
Download Bootstrap

When the download completes, go to your Downloads folder, unzip the file, and copy the highlighted files to the indicated directories inside your project:

# cd ~/Downloads
# unzip -a
# cd bootstrap-3.3.5-dist
Install Bootstrap
Install Bootstrap
# cp css/bootstrap.min.css /home/gabriel/NetBeansProjects/TecmintTest/public_html/styles
# cp fonts/* /home/gabriel/NetBeansProjects/TecmintTest/public_html/fonts
# cp js/bootstrap.min.js /home/gabriel/NetBeansProjects/TecmintTest/public_html/scripts

If you now expand the structure of your site in Netbeans, it should look as follows:

Site Structure in Netbeans
Site Structure in Netbeans
If you liked this article, then do subscribe to email alerts for Linux tutorials. If you have any questions or doubts? do ask for help in the comments section.

If You Appreciate What We Do Here On TecMint, You Should Consider:

TecMint is the fastest growing and most trusted community site for any kind of Linux Articles, Guides and Books on the web. Millions of people visit TecMint! to search or browse the thousands of published articles available FREELY to all.

If you like what you are reading, please consider buying us a coffee ( or 2 ) as a token of appreciation.

Support Us

We are thankful for your never ending support.

2 thoughts on “Adding jQuery and Bootstrap to Write a Mobile-Friendly and Responsive Web Application”

  1. @Jose,
    I could not agree more! Bootstrap makes it SO easy to develop mobile-friendly and responsive web applications without the hassle of having to deal with tables and CSS. Best of luck!


Leave a Reply to Gabriel Cánepa Cancel reply

Have a question or suggestion? Please leave a comment to start the discussion. Please keep in mind that all comments are moderated and your email address will NOT be published.

This site uses Akismet to reduce spam. Learn how your comment data is processed.