0

Do we really need to use bootstrap.js functionality / file while using bootstrap.css in styling webpages. If required optionally, what are the advantages of using the same?

1
  • 2
    How about reading the documentation of bootstrap? Commented Dec 29, 2014 at 3:32

2 Answers 2

2

The CSS file contains all the styling that makes Bootstrap look like Bootstrap.

The JS file contains all the JavaScript needed to render some graphic components and animations.

While you can indeed get away in certain scenarios by only including the CSS file, it all depends on the components you're planning to use - tooltips, modals, and dropdowns for example, utilise the JS file.

Sign up to request clarification or add additional context in comments.

Comments

1

The only goal to use bootstrap.js is fast implementation of dropdowns, modals and etc functions.

A lot of Angularjs developers (for example) didn't use native js at all (the use special lib - bootstrap ui (for angularjs only)).

But if you use JQuery-like code style - ask your self - why not? Much better to use native lib, then implement it functions by yourself/

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.