Tagged: jQuery, sticky footer
Hello. I’ve added the sticky footer code mentioned on https://kriesi.at/support/topic/custom-sticky-footer-navigation-isnt-displaying-properly/ and it is working great. How would I go about getting it to fade in when a user scrolls down? The effect I’m looking for can be found on http://www.alliancewealthmgmt.com/
Hi Roger!
Please try adding following code to Functions.php file in Appearance > Editor
function add_hide_footer(){
?>
<script>
jQuery(window).scroll(function(){
if(jQuery(this).scrollTop() > 200) jQuery('#footer').fadeIn('slow');
if(jQuery(this).scrollTop() < 200) jQuery('#footer').fadeOut('slow');
});
</script>
<?php
}
add_action('wp_footer', 'add_hide_footer');
If that does not work, please post the link to your website.
Regards,
Yigit