jQuery equivalent of body onLoad

前端 未结 6 792
梦毁少年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:23

    From the jQuery API on the ready handler:

    The .ready() method is generally incompatible with the attribute. If load must be used, either do not use .ready() or use jQuery's .load() method to attach load event handlers to the window or to more specific items, like images.

提交回复
热议问题