Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>I would definitely use <a href="https://github.com/EvandroLG/transitionEnd/" rel="nofollow noreferrer">this small script</a> available on Github. It's listed among Modernizr <a href="https://github.com/Modernizr/Modernizr/wiki/HTML5-Cross-browser-Polyfills#new-events" rel="nofollow noreferrer">"Cross-browser polyfills" page</a> so it can be trusted but Modernizr itself is <strong>not required</strong>. </p> <p>The examples in the Github page of the script are written using jQuery (and I can't understand why) but jQuery is also <strong>not required</strong> as it's written in <strong>vanilla js</strong>.</p> <p>Like so you'll have a useful <code>whichTransitionEnd</code> method available. I can't test it right now being on my laptop without IE8/IE9 available but I guess that this method will return <code>false</code> (or anything falsy) in those browsers.</p> <pre><code>var transition = transitionEnd(box).whichTransitionEnd(); // return for example "webkitTransitionEnd" </code></pre> <p>It will then be quite easy to target those browsers where transitions (and thus <code>transitionend</code> events) are not supported. Hope this will be a nudge in the right direction.</p> <p><strong>EDIT</strong></p> <p>After tweaking with the above code the OP came up with a much shorter version of the original script. It saves a good deal of bytes and only detects support for this event, and, in case it's supported returns the name of the event itself. </p> <p>You can find it <a href="https://gist.github.com/O-Zone/7230245" rel="nofollow noreferrer">here</a> as a gist and read more about it in the comments to this answer.</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload