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
http://jlaine.net
http://notkea.fi
http://odesign.fi

Check out my latest book, Unobtrusive Prototype, fresh off the Peepcode oven:
http://peepcode.com/products/unobtrusive-prototype-js

-- 
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 
prototype-scriptaculous+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/prototype-scriptaculous?hl=en.

Reply via email to