Last active
August 29, 2015 14:19
-
-
Save joshdcomp/a25049ff8384fe3ac678 to your computer and use it in GitHub Desktop.
how I'd make a
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
@keyframes content-peep{ | |
//bounce frames | |
} | |
.content{ | |
margin-top: 100vh; | |
&-is_peeping{ | |
animation: content-peep 200ms 1 500ms; | |
} | |
} |
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
function HeroSlider(){ | |
} | |
HeroSlider.prototype.windowPeep = function(){ | |
$(body).addClass('content-is_peeping'); | |
} | |
HeroSlider.prototype.init = function(){ | |
$(window).on('focus', $.proxy(this.windowPeep, this)); | |
} | |
var slider = new HeroSlider(); | |
$(function(){ | |
slider.init(); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment