jquery binding multiple events, and pass data
Posted
by mkoryak
on Stack Overflow
See other posts from Stack Overflow
or by mkoryak
Published on 2010-05-13T17:31:15Z
Indexed on
2010/05/13
17:34 UTC
Read the original article
Hit count: 262
jQuery
|javascript-events
I know we can have this in 1.4:
$("a").bind({
click : clickFn,
mouseover: mouseFn
});
and that is nice and i would like to use it, but it seems like there is no way to pass extra data to events bound this way, it needs to be done the 'old way':
$("a").bind("click", {"some":"data"}, clickFn);
Question: how can i pass the extra data to my event call backs and bind multiple events in a single bind at the same time?
© Stack Overflow or respective owner