Bug Tracker

Modify

Ticket #5984 (closed bug: fixed)

Opened 3 years ago

Last modified 3 years ago

$().ready() and $().bind('ready') behave differently

Reported by: mark_story Owned by:
Priority: trivial Milestone: 1.4.2
Component: unfiled Version: 1.4.1
Keywords: ready, bind Cc:
Blocking: Blocked by:

Description

Many of the shortcut methods are simple aliases, ie. click(), blur() and others. ready() however behaves in a very different manner than bind('ready', fn) does. bind('ready') will not automatically run any bound events if $.isReady. Which makes sense to some extent. However, since no difference in the behaviour is documented its easy to assume that ready() is a simple alias like the others. My suggestion would be to make a note how the two methods differ and that they are no directly analogous as far as binding of events is concerned.

Change History

comment:1 Changed 3 years ago by john

  • Status changed from new to closed
  • Resolution set to fixed

Good point, I just updated the docs:  http://api.jquery.com/ready/

comment:2 Changed 3 years ago by john

  • Component changed from docs to unfiled

Please follow the  bug reporting guidlines and use  jsFiddle when providing test cases and demonstrations instead of pasting the code in the ticket.

View

Add a comment

Modify Ticket

Action
as closed
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.