Hi there,
I have a ‘splash’ section at the top of my page that I want to hide on scroll. I have managed to achieve this (in a way!) however the page jumps down when the section fades out. Do you know if I can avoid this happening? Here is a link to the page https://dev.theslimmingclinic.com/new-home-scroll-test/
I have pasted my code below –
<div id="splash">
</div> <script> jQuery(document).ready(function() { jQuery(window).scroll(function() { if (jQuery(this).scrollTop() > 500) { jQuery('#splash').fadeOut(2000); } else { jQuery('#splash').fadeIn(2000); } }); }); </script>
Any ideas on how to resolve this would be much appreciated!