jquery - Javascripts not initiating correctly -
jquery - Javascripts not initiating correctly -
a wordpress site i've been working seems have weird initiation of of scripts. 1 concerned drop-down header. un-styled experimenting, but, if look, shouldn't dropping downwards until length downwards page, , while that, on page load, shows unti user interaction. know might happening? help much appreciated.
the site link nextworld.kbddev.com
here code bar:
<script> $(function() { $(window).scroll(function(){ if($(window).scrolltop() > 542){ $("#follownav").slidedown("fast"); $('#follownav').removeclass('hide').addclass('show'); } }); $(window).scroll(function(){ if($(window).scrolltop() < 542){ $("#follownav").slideup("fast"); } }); }); </script>
the problem not checking on page load.
a simple prepare be:
$(function(){ $(window).scroll(); });
javascript jquery
Comments
Post a Comment