Bug Tracker

Opened 11 years ago

Closed 11 years ago

#10905 closed bug (invalid)

JQuery Event Binding

Reported by: [email protected] Owned by:
Priority: undecided Milestone: None
Component: unfiled Version:
Keywords: Cc:
Blocked by: Blocking:

Description

JQuery is awesome. But I felt something missing I thought should suggest you. Whenever you create an event, and bind it to an element, say

$('.close').click(function(){...});

It works cool. But then when we create an element with the classname "close", the above created event is not attached to it. So anytime we create an element in the fly, we have to again attach the events to it. What I would suggest is to auto load/bind the existing events, like inheritance. And iff we want to change the event method, we can change it, like overloading. Let me know about this bug or feature. Take care

Change History (2)

comment:1 Changed 11 years ago by [email protected]

JQuery is awesome. But I felt something missing I thought should suggest you. Whenever you create an event, and bind it to an element, say

$('.close').click(function(){...}); It works cool. But then when we create an element with the classname "close", the above created event is not attached to it. So anytime we create an element in the fly, we have to again attach the events to it. What I would suggest is to auto load/bind the existing events, like inheritance. And iff we want to change the event method, we can change it, like overriding. Let me know about this bug or feature. Take care

comment:2 Changed 11 years ago by dmethvin

Resolution: invalid
Status: newclosed

Please see the .on() and .delegate() methods, and please use the forums unless you are reporting a bug.

Note: See TracTickets for help on using tickets.