Probably a simple one this, I''m trying to figure out how to get the mouse position from within a PeriodicalExecuter. Ideally I''d love to get it in relation to a particular element on the page. Just trying to update a div with the values at the moment, but want to link this in to various effects. Thanks in advance. Tim --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Spinoffs" group. To post to this group, send email to rubyonrails-spinoffs-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-spinoffs-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-spinoffs?hl=en -~----------~----~----~----~------~----~------~--~---
Only way I know is to add an observer to document.body (or a more specific element) for ''mousemove'' and update a variable somewhere constantly so when you need it it is hopefully up to date. Colin Tim Lockwood wrote:> Probably a simple one this, I''m trying to figure out how to get the mouse > position from within a PeriodicalExecuter. Ideally I''d love to get it in > relation to a particular element on the page. > > Just trying to update a div with the values at the moment, but want to link > this in to various effects. > > Thanks in advance. > Tim > > > > > . > >--~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Spinoffs" group. To post to this group, send email to rubyonrails-spinoffs-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-spinoffs-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-spinoffs?hl=en -~----------~----~----~----~------~----~------~--~---