Live data from Hacker News

Lemmings 404 page

romainbrasier.fr

51–60 of 78 posts

Re: Lemmings 404 page

#51

Earlier quoted context omitted.

$('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.

You're spot on that's the cleanest conceptual way to do it in jQuery. In more recent versions of jQuery, though, $.live is technically deprecated (1.7+). The equivalent new syntax is: $(document).on('mouseover', 'img', function() {});

That creates a event handler for all images on mouseover, even images that haven't been created yet.

You want to trigger the mouseover event, not bind to it. And you want to trigger it after the image has been inserted. Unfortunately there's no jquery event for dom insertions. But on firefox you can use a MutationObserver:

    MutationObserver(function(event) {
      $(event[0].addedNodes[0]).mouseover();
    }).observe($('body')[0], {childList: true});

Re: Lemmings 404 page

#52
post #32

As much as I love the 404, even more so I adore the immediate response of the hacker news community to find the best way to save all the lemmings. Bravo!

Followed by the inevitable snark denouncing what a waste of time and function it is.

Re: Lemmings 404 page

#53
post #50
post #45

I've said it before, but: What's the deal with 404 pages? If the content has moved, I should get a 30x redirect. If the server has a way of guessing what I wanted, I should get 300 Multiple Choices. If the server knows that what I'm looking for isn't anywhere, I should get 410 Gone. 404 is supposed to mean that the server has no idea what I'm looking for, no idea how to find it, no idea where to look. In that case, I…

Well I do think that "404" should be more visible but everything else is just part of design. It's like complaining that blogs should be just text or that CSS3 is pointless. It's design, it's interesting, I like it.

if you feel the point of "design" is simply to make something look pretty, or interesting, then you missed the point.

Re: Lemmings 404 page

#55
post #49

Earlier quoted context omitted.

1) This page in no way is related to page missing (404). My response that it is not a 404 page is correct. This page has nothing to do with 404 error. 2) I made an assumption, based on the context, that this page was serving a role that is used when the server is overloaded or otherwise unavailable. In that case, this page should not be serving a 200 status, it should be serving a 50X response. Now, it's possible tha…

It's probably technically incorrect, but the page title is "404 Doodoo error".

Didn't notice the title. That page is all over the place. The discussion the two characters were having was something like "Don't worry, the page will come back soon." Meaning, it's just a temporary error.

It's a fun page but horribly executed. The customer has no idea what's actually happening. Is this a server problem or is the page actually missing?

Re: Lemmings 404 page

#57
post #48

Save them all! (firefox only) MutationObserver(function(event) { $(event[0].addedNodes[0]).mouseover(); }).observe($('body')[0], {childList: true}); $('img').mouseover();

Much cooler than mine. I just ran

    $('img').each(function() { $(this).mouseover(); });
every few seconds. Something cool should have happened.

Re: Lemmings 404 page

#58
post #32

As much as I love the 404, even more so I adore the immediate response of the hacker news community to find the best way to save all the lemmings. Bravo!

Personally I got so sick and tired of Lemmings back when it was released that I find a feeling of peace by letting them all fall to their death.

Re: Lemmings 404 page

#59
post #48

Save them all! (firefox only) MutationObserver(function(event) { $(event[0].addedNodes[0]).mouseover(); }).observe($('body')[0], {childList: true}); $('img').mouseover();

pretty awesome, this works in chrome

  new WebKitMutationObserver(function(event) {
    $(event[0].addedNodes[0]).mouseover();
  }).observe(document.body, {childList: true});
Post reply on HN