Win a copy of The Little Book of Impediments (e-book only) this week in the Agile and Other Processes forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Displaying a DIV wherever the mouse location is

 
Santosh Ramachandrula
Ranch Hand
Posts: 252
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi, I am trying to do the above and I did some google but they seem to be tied to a mouse EVENT.

I want to be able to display the DIV wherever the mouse is without a Mouse Event. Can I do this? If yes how else any suggestions?
 
Bear Bibeault
Author and ninkuma
Marshal
Pie
Posts: 65339
97
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
No. Without an event, there is no way to run any code.
 
Santosh Ramachandrula
Ranch Hand
Posts: 252
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Ok.

I have a page where the user has

1. Scrolled down.
2. Performed an action.
3. Now I want to show a DIV containing Success/failure message at the center of the page relative to the current location.

How would I accomplish Step 3?
 
Bear Bibeault
Author and ninkuma
Marshal
Pie
Posts: 65339
97
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
In response to what? A mouse click?
 
Santosh Ramachandrula
Ranch Hand
Posts: 252
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks Bear, I figured it out and Yes, in response to mouse click.
 
Eric Pascarello
author
Rancher
Posts: 15385
6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
in case this shows up in a search, basic idea



Eric
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic