floating layer following the mouse

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

floating layer following the mouse

Tarek Ziadé
Hello,
I have added a fade-in/fade-out floating layer to display infos on Ajax request. 
I have used Position to display it on a corner.

Is there a simple way to make this floating layer displayed near the mouse
and make it follow the mouse movments

Tarek

--
Tarek Ziadé | www.afpy.org
Python - why settle for snake oil when you can have the whole snake?
(Mark Jackson)

_______________________________________________
Rails-spinoffs mailing list
[hidden email]
http://lists.rubyonrails.org/mailman/listinfo/rails-spinoffs
Reply | Threaded
Open this post in threaded view
|

Re: floating layer following the mouse

Nicolas-11
Hi,

In short :
Event.observe mousemouse
get position with Event.pointerX and Event.pointerY
position yout element with element.style.top and element.style.left

Regards,
Nico


On 12/23/05, Tarek Ziadé <[hidden email]> wrote:
Hello,
I have added a fade-in/fade-out floating layer to display infos on Ajax request. 
I have used Position to display it on a corner.

Is there a simple way to make this floating layer displayed near the mouse
and make it follow the mouse movments

Tarek

--
Tarek Ziadé | <a href="http://www.afpy.org" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">www.afpy.org
Python - why settle for snake oil when you can have the whole snake?
(Mark Jackson)

_______________________________________________
Rails-spinoffs mailing list
[hidden email]
<a onclick="return top.js.OpenExtLink(window,event,this)" href="http://lists.rubyonrails.org/mailman/listinfo/rails-spinoffs" target="_blank">http://lists.rubyonrails.org/mailman/listinfo/rails-spinoffs




_______________________________________________
Rails-spinoffs mailing list
[hidden email]
http://lists.rubyonrails.org/mailman/listinfo/rails-spinoffs