Create a gist now

Instantly share code, notes, and snippets.

Embed
What would you like to do?
prevent premature triggering of css transtions

Pre Load CSS Transitions

html

<body class="preload">

CSS

.preload * {
  -webkit-transition: none !important;
  -moz-transition: none !important;
  -ms-transition: none !important;
  -o-transition: none !important;
}

Javascript

$(window).load(function() {
  $("body").removeClass("preload");
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment