From: Laury GvR Date: Wed, 17 May 2017 16:26:15 +0000 (-0400) Subject: This theme was never supposed to have a sticky footer. The sticky-footer.js file... X-Git-Tag: v1.0.0^2~12 X-Git-Url: http://cvs2.gaslightmedia.com/gitweb/index.cgi?a=commitdiff_plain;h=4424a903913320fc18f79065f001e5dadbf4956d;p=WP-Themes%2Fpetoskey.git This theme was never supposed to have a sticky footer. The sticky-footer.js file was included by accident, and is now removed. --- diff --git a/js/app.js b/js/app.js index 6c548db..787891c 100644 --- a/js/app.js +++ b/js/app.js @@ -94,48 +94,3 @@ $(document).ready(function () { }); }); -; -// Set footer position on scroll -$(window).on('scroll', function () { - if ($(window).width() > 640) { - setTimeout(function(){ // Slight delay to avoid a jumpy transition - $('#sticky-topbar').css({'position' : get_footer_position}); - }, 200); - } -}); - -// Set footer position on load -$(function() { - var position = get_footer_position(); - $('#sticky-topbar').css({'position' : position}); -}); - -function get_footer_position() { - if ($(window).width() < 640) { - return 'relative'; - } - var footer = $('#sticky-topbar'); - var height_of_footer = footer.height(); - var top_of_footer = footer.position().top; - // Account for fixed header and padding on the sticky-footer container - var fixed_header_height = $('.top-bar-container').height() - 20; - - var top = $(window).scrollTop(); - var bottom = top + $(window).height() - fixed_header_height; - - if (top_of_footer < $(window).height()) { - return 'relative'; - } - else if (bottom >= top_of_footer) { - return 'relative'; - } - else if (bottom <= top_of_footer) { - return 'fixed'; - } - -// function remove_the_arrow() { -// $('.sticky-footer-wrapper-class:after').css('border-width', '0'); -// } -} - - diff --git a/js/custom/sticky-footer.js b/js/custom/sticky-footer.js deleted file mode 100644 index 6a65258..0000000 --- a/js/custom/sticky-footer.js +++ /dev/null @@ -1,45 +0,0 @@ - -// Set footer position on scroll -$(window).on('scroll', function () { - if ($(window).width() > 640) { - setTimeout(function(){ // Slight delay to avoid a jumpy transition - $('#sticky-topbar').css({'position' : get_footer_position}); - }, 200); - } -}); - -// Set footer position on load -$(function() { - var position = get_footer_position(); - $('#sticky-topbar').css({'position' : position}); -}); - -function get_footer_position() { - if ($(window).width() < 640) { - return 'relative'; - } - var footer = $('#sticky-topbar'); - var height_of_footer = footer.height(); - var top_of_footer = footer.position().top; - // Account for fixed header and padding on the sticky-footer container - var fixed_header_height = $('.top-bar-container').height() - 20; - - var top = $(window).scrollTop(); - var bottom = top + $(window).height() - fixed_header_height; - - if (top_of_footer < $(window).height()) { - return 'relative'; - } - else if (bottom >= top_of_footer) { - return 'relative'; - } - else if (bottom <= top_of_footer) { - return 'fixed'; - } - -// function remove_the_arrow() { -// $('.sticky-footer-wrapper-class:after').css('border-width', '0'); -// } -} - -