On 6.5.2011, at 0.12, Adonix wrote:

> Hi,
> I am wondering if it is possible, with Prototype, to have something
> like what Facebook does: When you mouse-over a post on your 'wall', a
> little 'x' appears on the top right of that post to delete it. So
> basically, i have a table consisting of a bunch of rows, and on the
> top right i want to have a small delete button.
> Right now i have all these buttons hardcoded in html, but it would be
> nicer to just move them to the mouse-over thing to clear up some
> space. I have no idea what the technique is called, so i hope i worded
> it correctly :)

It is possible using the onmouseover event, but personally I would just use CSS 
for it:

.row .delete { display: none; }
.row:hover .delete { display: block; }

This doesn't work reliably in ie6 but there are several hacks around it 
(http://www.xs4all.nl/~peterned/csshover.html, http://dean.edwards.name/IE7/ 
for example).

Jarkko Laine

Check out my latest book, Unobtrusive Prototype, fresh off the Peepcode oven:

You received this message because you are subscribed to the Google Groups 
"Prototype & script.aculo.us" group.
To post to this group, send email to prototype-scriptaculous@googlegroups.com.
To unsubscribe from this group, send email to 
For more options, visit this group at 

Reply via email to