Bootstrap: Modals shown using JavaScript is not animated

Created on 14 Jul 2020  路  4Comments  路  Source: twbs/bootstrap

When showing a modal using the Javascript API it does not use any animations. The data-* API is animated though.

https://codepen.io/ecnepsnai/pen/GRoBLZe

This is using v5 alpha1 (from cdnjs). I've reproduced this in Chrome, Firefox, and Safari on macOS.

js v5

All 4 comments

Isn't it because your are missing the fade class on 1st modal?

I confirm, @ecentinela If you want the animation you need to keep the .fade class.

See https://v5.getbootstrap.com/docs/5.0/components/modal/#remove-animation

Whoops, thanks folks!

no worries, glad it worked out :)

Was this page helpful?
0 / 5 - 0 ratings

Related issues

IamManchanda picture IamManchanda  路  3Comments

steve-32a picture steve-32a  路  3Comments

devdelimited picture devdelimited  路  3Comments

matsava picture matsava  路  3Comments

eddywashere picture eddywashere  路  3Comments