views:

58

answers:

6

Hi. I have a slideshow that opens when a thumbnail is clicked. Now I would like to know if there is a way to re-position the mouse with jQuery over the control elements of the slideshow?

+3  A: 

No, there isn't. You can't move the mouse pointer using client script.

Guffa
+1  A: 

Yes there is! (But not by much, and not in a useful way.)

You can set a custom cursor that looks like a mouse pointer. This way, you can get about 8 pixels movement of the mouse pointer.

Anything is possible!

;)

sje397
Wow. Now that's what I call thinking outside of the box. +1 for that! Not useful in any meaningful way - not to mention you can't guarantee that it'd look the same as the end-user's real pointer - but I'm just in awe at the audacity to even think about it :-).
Spudley
Interresting twist :), although the cursor will only appear to move while the hotspot remains in the same place, so you won't click where you think you do...
Guffa
+1  A: 

Absolutely not. The ramifications of being able to manipulate the mouse in any way from untrusted client side Javascript would be horrific, at best.

Sam Day
A: 

well manipulating mouse position with client scripts is not possible till i know. But there is an easy solution to that if you are using .NET platform

Here is a link to do so >>>> http://stackoverflow.com/questions/647236/moving-mouse-cursor-programmatically

J Sinh
Great answer if you're writing .NET.... but the question was for Javascript in a browser.
Spudley
so i have specified an option that "IF" "jquerybeginner"'s website is on .net platform than he can see the above link to get started. Rest i already gave the same answer as u did and when someone is asking to move the mouse cursor programmatically he would not be expecting suggestions for cursor style change code i suppose. Thanks anyways for correcting me.
J Sinh
A: 

Sorry, it can't be done. There is no way to reposition the mouse pointer using JQuery or Javascript. The mouse pointer is controlled by the operating system, not the browser.

The best you can do is change the style of the mouse pointer. This can be done in CSS or JS/JQuery, by changing the cursor style.

Normal usage would be to change it to a 'busy' pointer while you process something, etc.

If you want to hide it completely, try cursor:none; though I'm not sure how well supported this is. If it doesn't work for you, it is also possible to set it to an image, which means you could hide it by using a completely transparent graphic. But note that this feature definitely does have cross-browser compatibility issues.

Spudley
A: 

Ok. Thank you all for your quick answers. I think my question is solved!

jquerybeginner

related questions