Reputation: 1765
I'd like to use the Bootstrap Collapse plugin.
Collapse requires the transitions plugin to be included in your version of Bootstrap.
I've downloaded bootstrap-3.3.7-dist.zip
but it does not contain transitions.js
mentioned here: http://getbootstrap.com/javascript/#transitions
I've looked at the Gitbub rep (https://github.com/twbs/bootstrap/tree/v4-dev/js/dist), with no luck.
Where can I get Bootstrap transitions.js
from please?
Upvotes: 2
Views: 16213
Reputation: 18916
it is by default compiled inside the main bootstrap.js(and its min counterpart) file. you can easily open it(non-minified version) and see something like the following comments
/* ========================================================================
* Bootstrap: transition.js v3.4.1
* https://getbootstrap.com/docs/3.4/javascript/#transitions
* ========================================================================
* Copyright 2011-2019 Twitter, Inc.
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
* ======================================================================== */
......
/* ========================================================================
* Bootstrap: collapse.js v3.4.1
* https://getbootstrap.com/docs/3.4/javascript/#collapse
* ========================================================================
also note that in main custom download page of bootstrap all plugins are selected unless you want smaller and customized js and css files
Upvotes: 0
Reputation: 44
CSS is also required for individual code of collapse functionality
<script src="js/Plugins/bootstrap-collapse/bootstrap-collapse.js"></script>
<style>
.collapse {display: none;}
.collapse.in {display: block;}
.collapsing {position: relative;height: 0;overflow: hidden;-webkit-transition-timing-function: ease;-o-transition-timing-function: ease;transition-timing-function: ease;-webkit-transition-duration: .35s;-o-transition-duration: .35s;transition-duration: .35s;-webkit-transition-property: height,visibility;-o-transition-property: height,visibility;transition-property: height,visibility;}
</style>
I have created a .js file which is combination of both transition.js & collapse.js
Upvotes: 0
Reputation: 27397
Here is the source code from Github,
https://raw.githubusercontent.com/twbs/bootstrap/master/js/transition.js
Upvotes: 0
Reputation: 627
I always add this code to my HTML file and everything works fine for me. Here is the link for Bootstrap collapse Bootstrap Collapse
<!-- Latest compiled and minified CSS -->
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css" integrity="sha384-BVYiiSIFeK1dGmJRAkycuHAHRg32OmUcww7on3RYdg4Va+PmSTsz/K68vbdEjh4u" crossorigin="anonymous">
<!-- Optional theme -->
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap-theme.min.css" integrity="sha384-rHyoN1iRsVXV4nD0JutlnGaslCJuC7uwjduW9SVrLvRYooPp2bWYgmgJQIXwl/Sp" crossorigin="anonymous">
<!-- Latest compiled and minified JavaScript -->
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js" integrity="sha384-Tc5IQib027qvyjSMfHjOMaLkfuWVxZxUPnCJA7l2mCWNIpG9mGCD8wGNIcPD7Txa" crossorigin="anonymous"></script>
Upvotes: 0
Reputation: 2101
The dist/js folder includes the bootstrap compiled js, and the documentation says this :
If you're using the compiled (or minified) bootstrap.js, there is no need to include this—it's already there.
Otherwise, you can You can download the sources and the file is in the js folder.
Upvotes: 4