There is a jQuery quiz posted on the W3Schools site here...
http://www.w3schools.com/quiztest/quiztest.asp?qtest=jQuery
Question #16 is as follows,
Which jQuery function is used to prevent code from running, before the document is finished loading?
A. $(document).load()
B. $(document).ready()
C. $(body).onload()
I got it wrong by picking answer A. (their official answer is B.)
I answered it, thinking that I knew the following,
document.load fires after everything on the page loads including all images
document.ready fires only after the DOM is loaded (not necessarily all the images have been loaded)
I interpreted the original question's wording of, "document is finished loading", to include everything (with all the images). After all, I thought that's why they called it "document.load". Also for their answer to be correct, you'd have to conclude that "DOM" is the equivalent to "document". This does not seem right otherwise why call it "document object model" (DOM) instead of just "document"?
Despite the W3School claim that B is the correct answer, what is really the correct answer?
Thank-you for your thoughts.
Sidenote: Quoting my own comments in my other related question...
"I actually learn most of my jQuery over at the jQuery site and come search here at StackOverflow when I get stuck. I was mostly playing around with the quiz at W3School because I was investigating their "prerequisites" for jQuery Certification. I don't consider myself to be a jQuery expert but I easily scored 95% (19/20) on their quiz. Seeing the improper wording in that answer, I figured I'd confirm what I already suspected by posting here. My opinions on these kinds of certifications are now shifting."
EDIT:
I notified the W3Schools of the existence of this thread.
EDIT 2:
When I answered the original quiz question, I was thinking of $(window).load(), therefore my quiz answer was clearly incorrect. I believe this fact leaves none of the three multiple choice options as the correct answer. See my detailed answer below.