更新时间:2023-11-29 14:33:40
多个$(document).ready()
调用没有问题,只有几个警告:
There are no problems with multiple $(document).ready()
calls, only a couple of caveats:
$(document).ready()
内部声明的函数/变量/对象在其他任何情况下均不可见.参见此简单的演示.$(document).ready()
will not be visible in any others. See this simple demo.也请参见前面关于SO的问题:
Also see this previous question on SO: