Entry
-
Some nifty little thing that was surprisingly easy to whip up in prototype for the purpose of initially hiding the delete and edit controls in the comments section, but making them pop up if the comment <li> is hovered.
$$('li.cmnt b.controls').invoke('hide'); $$('li.cmnt').each(function(e) { id = e.readAttribute('id'); e.writeAttribute("onmouseover","$('"+id+"').down('b.controls').show();"); e.writeAttribute("onmouseout","$('"+id+"').down('b.controls').hide();"); });
I like the idea of making the user use some of their power to generate the document, even though you shouldn't rely on that I guess. Prototype is an awesome tools for these kinds of manipulations though.
