Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Enable transition animation for Bootstrap elements in IE 8/9

is there a way to enable nice transition animation in IE 8/9 for Bootstrap 3? I thought that it's a bug in my code, but then I checked Bootstrap's page, and even their sample:

http://getbootstrap.com/javascript/#collapse

does not animate in IE8/9, whereas in Chrome there's an animation.

like image 818
dragonfly Avatar asked Jan 26 '26 03:01

dragonfly


1 Answers

Twitter's Bootstrap 3.0.0 don't have support for transitions in IE7/8/9, see also: https://github.com/twbs/bootstrap/pull/3052

To add it you will have to change the plugin and add jquery .animate() function to mimic the effects. Example code: https://github.com/twbs/bootstrap/pull/3052/files

Transition support is checked in transition.js based on Modernizr code (the same way as described here: https://stackoverflow.com/a/12174628/1596547)

In your plugin look for if (!$.support.transition) and do something like:

if (!$.support.transition) { this.$element.animate() }
like image 130
Bass Jobsen Avatar answered Jan 28 '26 21:01

Bass Jobsen



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!