Why is $(document).ready not firing for me?

后端 未结 12 1621
后悔当初
后悔当初 2020-12-10 00:26

In a php file i have used include to include the following js.php file and prior to that i have included the jquery file.



        
12条回答
  •  小蘑菇
    小蘑菇 (楼主)
    2020-12-10 01:10

    In my case document.ready was not called because a html form was sent to server by Ajax request and only part of document was recived - and document ready is not called after ajax request.

    In consequence some buttons which were on that part that was reloaded was not binded to events .click() atc.. anymore because these buttons were new and binding of these events was called during document ready only first time - not for AJAX.

提交回复
热议问题