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.
You can simply use
/*jslint browser:true */
in the beginning of the code to assume a browser.
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.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With