2015-09-23 17:48:35 -05:00

20 lines
462 B
JavaScript

(function() {
var R = window.Resume = {};
R.PageView = Backbone.View.extend({
el: $("body")[0],
initialize: function(options) {
window.addEventListener("scroll", this.fixHeader);
},
fixHeader: _.throttle(function(e) {
var $h = $("header");
if ($(document).scrollTop() > 100) {
$h.addClass("fixed"); }
else $h.removeClass("fixed"); }, 100)
});
})();