Skip to content

Commit 4d60965

Browse files
committed
Docs: Remove reference to deprecated .ready() method
Fixes #221
1 parent 4c86903 commit 4d60965

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Diff for: warnings.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -129,7 +129,7 @@ This is _not_ a warning, but a console log message the plugin shows when it firs
129129

130130
**Cause**: Using one of jQuery's API methods to bind a "ready" event, e.g. `$( document ).on( "ready", fn )`, will cause the function to be called when the document is ready, but only if it is attached before the browser fires its own `DOMContentLoaded` event. That makes it unreliable for many uses, particularly ones where jQuery or its plugins are loaded asynchronously after page load.
131131

132-
**Solution**: Replace any use of `$( document ).on( "ready", fn )` with `$( document ).ready( fn )` or more simply, just `$( fn )`. These alternative methods work reliably even when the document is already loaded.
132+
**Solution**: Replace any use of `$( document ).on( "ready", fn )` with `$( fn )`. This approach works reliably even when the document is already loaded.
133133

134134
### JQMIGRATE: Additional params for 'jQuery.easing' functions are not documented and redundant
135135

0 commit comments

Comments
 (0)