Skip to main content

Bug Tracker

Side navigation

#202 closed enhancement (fixed)

Opened September 17, 2006 12:53PM UTC

Closed December 28, 2006 11:37AM UTC

Last modified June 21, 2007 04:15AM UTC

Binding events with parameters

Reported by: Stefan Petre Owned by:
Priority: major Milestone: 1.1a
Component: event Version: 1.1a
Keywords: Cc:
Blocked by: Blocking:

I whould like you to bring to another level the bind() function so it can accept extra parameters to pass to called function something like:

bind(type, fn, [array parameters])

Attachments (0)
Change History (4)

Changed September 17, 2006 07:59PM UTC by joern comment:1

Something like this?

clickHandler = function(event, params) {
  // do something with event and/or params
$("a").bind("click", clickHandler, [1, 2, 3]);

You could then also extend each event:

$("a").click(clickHandler, [1, 2, 3));

Would that be of any use?

Changed September 18, 2006 04:36AM UTC by brandon.aaro comment:2

I've been spoiled by other libraries in this area and have enjoyed easily passing extra params to event handlers. This type of feature would be great.

Changed November 15, 2006 12:50PM UTC by joern comment:3

milestone: → 1.1
priority: minormajor
version: → 1.1

Check this for reference when implementing:

Changed December 28, 2006 11:37AM UTC by joern comment:4

resolution: → fixed
status: newclosed

Fixed in SVN.