Sorry, I forgot to specify. This is the code:
getContent: function()
{
var dyn = this;
new Ajax.Request(this.script, {
onSuccess: function(req)
{
dyn.content = req.responseJSON;
document.fire('content:retrieved',
req.responseJSON);
}
});
//$$(this.selector).invoke('observe', 'click',
this.changeContent.bind(this));
$$(this.selector).each(function(element, index) {
element.observe('click', dyn.changeContent.bind(dyn));
});
}
I want to pass the index as an extra argument to dyn.changeContent,
because I want to know which of the links was clicked.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Prototype & script.aculo.us" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/prototype-scriptaculous?hl=en
-~----------~----~----~----~------~----~------~--~---