親要素へのクリック イベントがあり、そのイベントをその子要素に委任しました。ただし、このクリックを発生させ、シミュレートされたクリック イベントの情報をイベント リスナーに渡したいと考えています。
$('rt-main').addEvent('click:relay(.catClick)', function(e){
e.stop();
new Request({
method: 'get',
url: 'index.php?option=com_categories&tmpl=component&view=listing&cat=' + this.get('id'),
onComplete: function(response){
$('rt-main').set('html', response);
}
}).send();
});
// Here I want to fire the event. But how to pass in 'id' of my choosing?
// I know that this particular line fires the first anchor. How do I target a
// psuedo-anchor? Or is it better to target a class?
$('rt-main').fireEvent('click',
{target: $('rt-main').getElement('a'), stop: Function.from}
);