jQuery equivalent of body onLoad

前端 未结 6 824
梦毁少年i
梦毁少年i 2020-12-29 04:37

Is it allowed to use along with jQuery\'s document.ready() handlers? I can\'t find a way to achieve the same funct

6条回答
  •  半阙折子戏
    2020-12-29 05:22

    .load(), .unload() or .error() are deprecated since jQuery 1.8. Lookup for these aliases in your code and replace them with the .on() method instead

    $(window).on('load', function(){...})
    

提交回复
热议问题