20 lines
462 B
JavaScript
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)
|
|
});
|
|
|
|
})();
|