What is window load alternative?

前端 未结 1 954
没有蜡笔的小新
没有蜡笔的小新 2021-01-07 06:18

I have a following situation: I want to show my images at once only when the page is fully loaded because I want to avoid showing images one by one inside <

相关标签:
1条回答
  • To bind the load event to the window, you should use the on method provided by jQuery.

    The .on() method attaches event handlers to the currently selected set of elements in the jQuery object. As of jQuery 1.7, the .on() method provides all functionality required for attaching event handlers.

    $(window).on("load", function(){...})
    
    0 讨论(0)
提交回复
热议问题