Skip to main content

Bug Tracker

Side navigation

#10905 closed bug (invalid)

Opened November 27, 2011 10:22PM UTC

Closed November 28, 2011 01:38AM UTC

JQuery Event Binding

Reported by: elton2jain@gmail.com 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

Attachments (0)
Change History (2)

Changed November 27, 2011 10:24PM UTC by elton2jain@gmail.com comment:1

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

Changed November 28, 2011 01:38AM UTC by dmethvin comment:2

resolution: → invalid
status: newclosed

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