I’m just trying to figure out how to stop the script from running and rotating images onClick().
Any help? Please?
Thanks, in advance!
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.
This will only stop the images. If you want to be able to toggle stopping and animating, you can keep track of the stop/resume state using
dataset(at least, I suggest you do it that way) and callnumbwhen resuming state to start the timeout once again.This is not 100% cross-browser compatible. You’ll have to use
attachEventfor IE, and you shouldn’t usethetimeras a global variable, but declare it withvar.