Live data from Hacker News

Lemmings 404 page

romainbrasier.fr

11–20 of 78 posts

Re: Lemmings 404 page

#13

var ims = document.getElementsByTagName('img'); var event = document.createEvent("MouseEvent"); event.initMouseEvent("mouseover", true, true, window); for(var i=0;i :(

$("img").mouseover()

    window.setInterval(function() { 
      $('img').mouseover(); 
    }, 500);
So you can catch the ones that haven't been created yet.

Re: Lemmings 404 page

#15

Earlier quoted context omitted.

$("img").mouseover()

window.setInterval(function() { $('img').mouseover(); }, 500); So you can catch the ones that haven't been created yet.

aww man...

    var event = document.createEvent("MouseEvent");
    event.initMouseEvent("mouseover", true, true, window);

    function save_them_prontos(){
        var ims = document.getElementsByTagName('img');

        for(var i=0;i
triple :(

Re: Lemmings 404 page

#16

Earlier quoted context omitted.

$("img").mouseover()

window.setInterval(function() { $('img').mouseover(); }, 500); So you can catch the ones that haven't been created yet.

$('img').live('mouseover', function() {});

Same, but nicer, listens to mouseover events on img elements that may not exist yet. Then again, this will - if I understand correctly - cause the event to bubble up in the DOM until it reaches the root element, where jquery's live callback handler will check what element the event took place on and invoke that callback.

Re: Lemmings 404 page

#17
post #6

best 404 page i've seen ! I ended up playing. Code is pretty neat. I thought you'd need more lines than this. http://www.romainbrasier.fr/js/lemmings.js

`this.img=eval($('.last'));`

Why is he using eval here?

Re: Lemmings 404 page

#18

Half on-topic, half off-topic: WebGL Lemmings port: http://webglgaming.com/lemmings/index.php

Actually, that is a copy of DHTML lemmings from before the age of WebGL, Ajax, CSS sprites (alistapart only came up with an article about CSS sprites a year later), html5, or any of that fancy modern stuff kids these days play with. The original is at http://www.elizium.nu/scripts/lemmings/.

And background info / blogpost, written seven years later by the author: http://crisp.tweakblogs.net/blog/3881/dhtml-lemmings-primer....

Post reply on HN