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?
2 Answers
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.
Comments
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/