gets app completly uptodate with prototype

This commit is contained in:
Galen Frechette
2012-06-20 14:37:37 -04:00
parent 47e06692d8
commit 94886643b0
49 changed files with 12204 additions and 3588 deletions

View File

@@ -0,0 +1,12 @@
$(function() {
var offset = $('.filter nav').offset().top;
$(window).scroll(function() {
if (offset <= window.pageYOffset) {
return $('.filter nav').addClass('fixed-top');
}
else if (offset >= window.pageYOffset) {
return $('.filter nav').removeClass('fixed-top');
}
});
});

View File

@@ -0,0 +1,23 @@
$(function() {
var stickyFooter = function(){
var pageHeight = $('html').height();
var windowHeight = $(window).height();
var footerHeight = $('footer').outerHeight();
var totalHeight = $('footer').hasClass('fixed-bottom') ? pageHeight + footerHeight : pageHeight;
if (windowHeight < totalHeight) {
return $('footer').removeClass('fixed-bottom');
} else {
return $('footer').addClass('fixed-bottom');
}
};
stickyFooter();
$(window).resize(function() {
console.log("resizing");
stickyFooter();
});
});