3

In a discussion, someone argued that embedding Javascript in a <script> just before the </body> HTML tag is as good as using JQuery's document-ready. Is that true? Is it really safe in all situations for all browsers?

Update: Great answer available here.

Community
  • 1
  • 1
Jérôme Verstrynge
  • 57,710
  • 92
  • 283
  • 453
  • 1
    Its not "as good", its considered better practice in most cases – A. Wolff Jun 14 '13 at 09:55
  • http://stackoverflow.com/questions/6005789/when-do-you-need-to-use-document-ready and http://stackoverflow.com/questions/4643990/jquery-is-document-ready-necessary – Ravi Gadag Jun 14 '13 at 09:55
  • Of course it's not as good, it doesn't use enough jQuery. – nnnnnn Jun 14 '13 at 09:56
  • more duplicates: http://stackoverflow.com/questions/1438883/jquery-why-use-document-ready-if-external-js-at-bottom-of-page and http://stackoverflow.com/questions/6877390/is-document-ready-necessary-if-i-put-all-my-javascript-at-the-bottom-of-the-p – Halcyon Jun 14 '13 at 09:57

0 Answers0