Does this code need to be in a document.ready?

前端 未结 7 2119
清酒与你
清酒与你 2020-12-28 13:09

The document.ready is used to execute code after the DOM is fully loaded. This can be used to attach event handlers to elements on the page e.g



        
7条回答
  •  庸人自扰
    2020-12-28 13:47

    When using actions to elements or calling them (that will be generated in DOM or don't exist yet) you need to use $(document).ready

提交回复
热议问题