Is there a way to create a click event(or effect) that repeat the last click.
I need no jQuery nor Mootools nor any other javascript lib, just in pure JavaScipt.
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
You want to Google for ‘firing events manually in JavaScript’ or ‘simulate events in JavaScript’.
Since you captured the last event, you know what it is and can feed it into a function. Put a timer or counter on it to stop after a specified period of time or repeats.
Here is some sample code:
Check this site:
http://lifescaler.com/2008/04/simulating-mouse-clicks-in-javascript/