Bug Tracker

Opened 10 years ago

Closed 10 years ago

#12188 closed bug (wontfix)

Strange JQuery behaviour with global Object extension and event triggers

Reported by: tinnerdxp Owned by:
Priority: undecided Milestone: None
Component: unfiled Version: 1.7.2
Keywords: Cc:
Blocked by: Blocking:



It's my first report - so please feel free to correct me as much as you can.

I've noticed a strange behaviour of JQuery core v1.7.2 (and older versions).

When I dynamically build an element $('<a>') and dynamically attach event to it through either .bind() or .click() and have generic Object object extended to have a method (doesn't matter what method and what it does) it seems that JQuery is triggering that method for ALL "click" events. To make things worse, if the extended method signature uses a parameter it causes JQuery to error out completely.

This "works" and demonstrates the function to be executed every time:

This "doesn't work" and errors out:

kind regards tinnerdxp

Change History (1)

comment:1 Changed 10 years ago by Rick Waldron

Resolution: wontfix
Status: newclosed
Note: See TracTickets for help on using tickets.