I've just submitted a patch to fix this, but in the meantime you can use
an anonymous function (as I just described in another message) like so:
function tocDisplay(e){
$('#toc_content')[e.data.mode]();
}
$('#toc_header').bind('click', {mode: 'toggle'}, function(e){
tocDisplay(e);
});
$('#toc_content a').bind('click', {mode: 'hide'}, function(e){
tocDisplay(e);
});
--
Jesse Skinner
http://www.thefutureoftheweb.com
DaveG wrote:
I'm binding a click function. If I include either one of the binds it
works -- so the syntax and object references are correct.
If I include both binds they do not work. No errors, they just don't
trigger.
function tocDisplay(e){
$('#toc_content')[e.data.mode]();
}
$('#toc_header').bind('click', {mode: 'toggle'}, tocDisplay);
$('#toc_content a').bind('click', {mode: 'hide'}, tocDisplay);
Is there a problem binding the same function to multiple objects?
~ ~ Dave