Skip to content

Instantly share code, notes, and snippets.

View raglan-road's full-sized avatar

Adam J. McIntyre raglan-road

View GitHub Profile
@raglan-road
raglan-road / animation
Last active December 17, 2015 09:09 — forked from mbutler-cs/animation
/* the css here */
@include keyframes(fadeIn) {
from {
height: 0;
opacity: 0; }
to {
height: auto; /* Not sure how well this will work */
opacity: 1; }
}
@raglan-road
raglan-road / gist:3258270
Created August 4, 2012 15:08 — forked from adamjmcintyre/gist:3098766
Using CSS keyframe animationend event cross-browser with jQuery
$('.some-els').bind('animationend webkitAnimationEnd MSAnimationEnd oAnimationEnd', function(){
// Do something!
$(this).removeClass('animation-class');
})
.addClass('animation-class');
// One works, too
$('.some-els').one('animationend webkitAnimationEnd MSAnimationEnd oAnimationEnd', function(){
// Do something once!
console.log('this would show once');