What jQuery event is called right after $(document).ready()?

前端 未结 8 899
囚心锁ツ
囚心锁ツ 2021-01-13 08:47

I have lots of HTML generated on $(document).ready(). I have a simple window system. But not only it is generated on $(document).ready() - also som

相关标签:
8条回答
  • 2021-01-13 09:23

    If you want something to fire right after all $(document).ready() calls, you can put this once anywhere in your page:

    $(document).ready(function() {
        setTimeout(function() {
            // call your code here that you want to run after all $(document).ready() calls have run
        }, 1);
    });
    

    This will get called along with all the other document.ready calls, but it sets a short timeout that will execute after all the other document.ready calls have finished.

    0 讨论(0)
  • 2021-01-13 09:31
      $(window).load(function(){
       //some code after ready 
      });
    
    0 讨论(0)
提交回复
热议问题