function showMenu(e)
{
document.onmouseup = hideMenu;
var mailMenu = EBID('mailMenu');
/*
var offset = e.offset();
or
var offset = mailMenu.offset();
*/
mailMenu.style.left = offset.left + 'px';
mailMenu.style.top = offset.top + 'px';
mailMenu.style.display = '';
}
not work :(
can give me an example how can do it.
On 27 Lug, 15:36, Karl Swedberg <[email protected]> wrote:
> On Jul 27, 2009, at 8:20 AM, GONNY wrote:
>
> > e.clientY and eclientx not work properly.
>
> Your subject refers to offset left/top, but it looks like your
> function is trying to get the mouse coordinates (e.clientX/e.clientY)
>
> for offset, use jQuery's offset method:
>
> http://docs.jquery.com/CSS/offset
>
> for mouse coordinates, use e.pageX and e.pageY:
>
> http://docs.jquery.com/Events/jQuery.Event#event.pageX.2FY
>
> This article may help explain why e.clientX/e.clientY aren't working
> for you:
>
> http://www.quirksmode.org/js/events_properties.html#position
>
> "As to the mouse position, the situation is horrible. Although there
> are no less than six mouse coordinates property pairs, there is no
> reliable cross–browser way to find the mouse coordinates relative to
> the document we need."
>
> --Karl
>
> ____________
> Karl Swedbergwww.englishrules.comwww.learningjquery.com
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"jQuery Development" 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/jquery-dev?hl=en
-~----------~----~----~----~------~----~------~--~---