Skip to content

.load() method recommended on .ready() page, even though it's deprecated #964

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
c-harding opened this issue Aug 4, 2016 · 2 comments
Closed
Assignees

Comments

@c-harding
Copy link

In the yellow warning box on http://api.jquery.com/ready/, the .load() method is recommended, even though it has been removed in 3.0.0, and was deprecated in 1.8.

@dmethvin dmethvin self-assigned this Aug 6, 2016
@dmethvin
Copy link
Member

dmethvin commented Aug 6, 2016

I'll work on rephrasing this, there are several things that need to be clarified.

@dmethvin
Copy link
Member

dmethvin commented Aug 6, 2016

Additionally:

  • Mention preference for $(function); others are deprecated since they don't use their selection.
  • When multiple functions are added, they run in the order they are added.
  • As of jQuery 3.0 an error in one function will not prevent subsequent functions from running.
  • Do not assume that it is safe to attach document.onload handlers in a ready function.
  • Ready functions are guaranteed to run even when loaded long after the document has finished loading; window.onload is not

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

2 participants