can anyone help me please to slove transition issue bootstrap 4.
this is making error Uncaught Error: Collapse is transitioning issue is only when not include bootstrap css. in my case bootstrap css conflict my large css. can anyone help to slove out this hell
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.1.1/jquery.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/tether/1.4.0/js/tether.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/4.0.0-alpha.6/js/bootstrap.js"></script>
<div id="accordion" role="tablist" aria-multiselectable="true">
<div class="card">
<div class="card-header" role="tab" id="headingOne">
<h5 class="mb-0">
<a data-toggle="collapse" data-parent="#accordion" href="#collapseOne" aria-expanded="true" aria-controls="collapseOne">
Collapsible Group Item #1
</a>
</h5>
</div>
<div id="collapseOne" class="collapse show" role="tabpanel" aria-labelledby="headingOne">
<div class="card-block">
Anim pariatur cliche reprehenderit, enim eiusmod high life accusamus terry richardson ad squid.
</div>
</div>
</div>
<div class="card">
<div class="card-header" role="tab" id="headingTwo">
<h5 class="mb-0">
<a class="collapsed" data-toggle="collapse" data-parent="#accordion" href="#collapseTwo" aria-expanded="false" aria-controls="collapseTwo">
Collapsible Group Item #2
</a>
</h5>
</div>
<div id="collapseTwo" class="collapse" role="tabpanel" aria-labelledby="headingTwo">
<div class="card-block">
Anim pariatur cliche reprehenderit, enim eiusmod high life accusamus terry richardson ad squid.
</div>
</div>
</div>
</div>
4
Answers
Collapse div using following code:
Check out this FIDDLE.
This issue has been solved on Bootstrap 4.0.0-beta. The 4.2.1 version is available now!
There are several ways to download it:
git clone https://github.com/twbs/bootstrap.git
npm install bootstrap
yarn add [email protected]
composer require twbs/bootstrap:4.2.1
Install-Package bootstrap
Sass:Install-Package bootstrap.sass
You can see the Beta 1 ship list #21568 link for more information.
INITIAL ANSWER
There is an error with the Bootstrap
v4.0.0-alpha.6
version with the transitioning that will be solved on the next release.See the issue 22256, pull 21743 and v4.0.0-beta milestone links for more information.
For while, you can use workarounds like the @Nayana_Das example.
I recently also had the problem with an older BT project. My problem was simply that I had 2 navbars and both had the same id (as I copied the example twice).
This does not seem to be the case here but I thought I mention it as somebody else might come across this question and has the same issue.
I have faced same problem and accidentally came up with a solution.
In the above Code I have to collapse id ->
#collapse1
And Accidentally I created two div and when I reloaded my page the second one was working fine, and first one opened but was not closing and giving the error of transitioning. So I just deleted the content of first
#collapse1
and keep it empty and the second one is working fine.I also tried other options such as updating Bootstrap version or changing the place of div, none of them worked. I hope this helps.
Thank you