jQuery force mouse move and click
Demo: http://开发者_运维百科jsfiddle.net/thisizmonster/VRPDa/
Purpose:
- Mouse must move to button position (button position must auto calculate)
- Fire mouse click event
How do it?
Edited/Added
Since everyone said I can't move mouse coordinate, I think its failed. Btw my main purpose is because of Facebook Comment plugin. By default its shows "by social ranking". My requirement is default by "Reverse Chronological". But plugin itself placed in iFrame, So I can't access its elements. So I decided after page loaded, quickly move mouse and choose option and revert back mouse coordinate. Its failed I think :(
Fortunately, you cannot control the mouse-pointer position through Javascript.
- Not possible
$('#item').click();
or$('#item').trigger('click');
(use the latter for other triggers likemouseenter
精彩评论