Created
November 6, 2013 13:38
-
-
Save willmorgan/7336191 to your computer and use it in GitHub Desktop.
transitionmasher.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
if(this.transitions) { | |
body.addClass('bhv-transition-now').css('height', fullHeight); | |
body.height(); | |
body.removeClass('bhv-transition-now').addClass('state-transitioning'); | |
body.height(); | |
body.css('height', 0); | |
body.on('transitionend.close', function(event) { | |
body.off('transitionend.close'); | |
body.addClass('state-hidden'); | |
body.height(); | |
body.removeClass('state-transitioning'); | |
body.height(); | |
body.removeAttr('style'); | |
}); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Reading the DOM with body.height() causes a repaint to happen, and consolidates all class switching changes.