$(window).scroll() firing on page load

后端 未结 5 616
无人及你
无人及你 2020-12-20 16:01

Is there a way to prevent $(window).scroll() from firing on page load?

Testing the following code in Firefox 4, it fires even when I unplug the mouse.<

5条回答
  •  天涯浪人
    2020-12-20 16:08

    sure, don't load it until after the load. make it a call back for sleep for 500 millis.

提交回复
热议问题