Re:Easier browsing of Hacker News...for me
by marrone on Friday June 13, 2008 @12:32PM
(#216882)
I didnt look to closely, but it looks like you are creating a closure around the comments var for your event listener function. The problem is that you are doing this within a loop, meaning the comments var changes after each iteraion, probably ending up in something you hadnt intended
[ Parent
| on HN ]
Re:Easier browsing of Hacker News...for me
by Xichekolas on Friday June 13, 2008 @12:37PM
(#216888)
But even if I create an anonymous function that just calls alert(), the click event never fires. i.e. ->
byId(thisnode.id).addEventListener('click', function(ev) { alert('test'); }, false);
Won't fire either.