jQuery force mouse move and click

Gereltod picture Gereltod · Sep 11, 2011 · Viewed 9.4k times · Source

Demo: http://jsfiddle.net/thisizmonster/VRPDa/

Purpose:

  1. Mouse must move to button position (button position must auto calculate)
  2. 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 :(

Answer

Tarek Fadel picture Tarek Fadel · Sep 11, 2011
  1. Not possible
  2. $('#item').click(); or $('#item').trigger('click'); (use the latter for other triggers like mouseenter