Skip to content

Instantly share code, notes, and snippets.

@bgadrian
Last active August 29, 2015 14:17
Show Gist options
  • Save bgadrian/a7aedc545d59000f10ca to your computer and use it in GitHub Desktop.
Save bgadrian/a7aedc545d59000f10ca to your computer and use it in GitHub Desktop.
Transition css3 animations jquery plugin - fallback to animate
//Works with jquery transition animations plugins that are similar to jquery animate function
//use this to gracefully fallback to regular JS animations when the browser don't support
//css3 animations
//IE10 says that supports animations but don't really work so all IE sucks
if (Modernizr.csstransforms && Modernizr.cssanimations && Modernizr.csstransitions && ! jQuery.browser.msie) {
navigation.css3animations = true;
} else {
$j.fn.transition = $j.fn.animate;//fallback transition plugin to jquery animate
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment