Monday, June 3, 2024
 Popular · Latest · Hot · Upcoming
46
rated 0 times [  47] [ 1]  / answers: 1 / hits: 17562  / 13 Years ago, wed, august 17, 2011, 12:00:00

I get a



'document' has not been fully defined yet.
$(document).ready(function () {


warning from jsLint.
I get why this happends but I would like my code to be warning free.



My question is - how do I either solve this in code (assign document to itself? var document=document?) or maybe make the warning go away some other way.



Thanks.


More From » jquery

 Answers
21

I think you can safely ignore that. If you don't want it to show anyway, rewrite it like so



$(function () {
// Document is ready
});


$(function () {}) and $(document).ready(function () {}) are equivalent.


[#90571] Monday, August 15, 2011, 13 Years  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
lindsay

Total Points: 402
Total Questions: 109
Total Answers: 109

Location: Tuvalu
Member since Sat, Feb 11, 2023
1 Year ago
;