dlearman1
asked on
What is the correct jQuery usage ( document ).ready... or ('document').ready...?
What is the correct jQuery usage ( document ).ready... or ('document').ready...? I've always used ( document ).ready, but I'm working with a developer module that uses ('document').ready; and it seems to work. Are the forms interchangeable?
ASKER
I gather you're telling me that $(document) is correct, which is fine. The question remains "why does ('document') also work with no issues?
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
there's no <window></window> so we use $(window)
window.document : https://developer.mozilla.org/en-US/docs/Web/API/Window/document
window.window : https://developer.mozilla.org/en-US/docs/Web/API/Window/window
note : window. is used to access global objects
check this :