Hello,

Personnaly, I like to use CSS only as soon as possible. But when the
behaviour differs depending on the browser, I'd rather use a generic
solution.

As said before, you must use the "onmouseover" event, in which you use
the "show()" method, and with "onmouseout" event, the "hide()" method.
Prototype handles this very well AFAIK.

Some help on the events observers : http://api.prototypejs.org/dom/Event/

Regards,
Julien.

On 6 mai, 09:20, Jarkko Laine <[email protected]> wrote:
> 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 Lainehttp://jlaine.nethttp://notkea.fihttp://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 [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/prototype-scriptaculous?hl=en.

Reply via email to