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

后端 未结 12 1643
后悔当初
后悔当初 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:11

    1. Check whether jQuery is loaded correctly.
    2. Look at the browser's progress bar: it may be loading some counters and the document is not ready until they're loaded: this often happens when external resources are slow.
    3. Try $(function(){ alert(...); }); just in case...
    4. Check whether you have JS errors prior to this onload binding. Use Firefox's FireBug plugin to check it out.

提交回复
热议问题