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

Popular posts from this blog

web services - java.lang.NoClassDefFoundError: Could not initialize class net.sf.cglib.proxy.Enhancer -

Accessing MATLAB's unicode strings from C -

javascript - mongodb won't find my schema method in nested container -