is there a simpler way to do this

without having to add

PHP Code:
$('link1').addEvent('click', function(event) {
event = new Event(event).stop();
for every single scrollable items. it gets kinda cluttered once you have a lot of them, since im trying to integrate this into a dynamic application. someone told me to use foreach

but i have no idea how to do that

any ideas?