Bug Tracker

Opened 6 years ago

Closed 6 years ago

Last modified 6 years ago

#12952 closed feature (notabug)

Suggestion re live()

Reported by: hhurford Owned by:
Priority: undecided Milestone: None
Component: unfiled Version: 1.8.2
Keywords: Cc:
Blocked by: Blocking:

Description

When an event handler is applied to an id..

why not make live() the default behaviour?

Rationale: If the object exists, apply the handler. If the object appears later, apply the handler

Why must I code it with live() to handle the second case?

Change History (2)

comment:1 Changed 6 years ago by dmethvin

Resolution: notabug
Status: newclosed

The best place to learn about delegated events and their drawbacks would be in the .live documentation at http://api.jquery.com/live/ and http://api.jquery.com/on/ , then ask for help on the forum.

comment:2 in reply to:  1 Changed 6 years ago by hhurford@…

Replying to dmethvin:

The best place to learn about delegated events and their drawbacks would be in the .live documentation at http://api.jquery.com/live/ and http://api.jquery.com/on/ , then ask for help on the forum.

Thanks to dmethvin for the reply. My use of live() came from a Sitepoint book, I did not know that it was an obsolete function. I will re-code using on()

Note: See TracTickets for help on using tickets.