-2

How to force Bootstrap to use its transition.js and jQuery animations, instead of CSS3 transition? I use lot of animations, and it fails on iPad.

Siguza
  • 21,155
  • 6
  • 52
  • 89
mrdaliri
  • 7,148
  • 22
  • 73
  • 107

1 Answers1

0

A simple, albeit hackish, way to this would be to open transitions.js and replace

  function transitionEnd() {
    var el = document.createElement('bootstrap')

    var transEndEventNames = {
      WebkitTransition : 'webkitTransitionEnd',
      MozTransition    : 'transitionend',
      OTransition      : 'oTransitionEnd otransitionend',
      transition       : 'transitionend'
    }

    for (var name in transEndEventNames) {
      if (el.style[name] !== undefined) {
        return { end: transEndEventNames[name] }
      }
    }

    return false // explicit for ie8 (  ._.)
  }

with

function transitionEnd(){ return false; }

If you're using minified Bootstrap, find the same function and replace its contents with return false;.


This causes $.support.transition to be set to false, which causes Bootstrap to think the browser does not support CSS3 animations. BEWARE, however, as doing this will hurt performance on many devices.

Mooseman
  • 18,763
  • 14
  • 70
  • 93