how best to go about cycling through li’s and repeating?
should i use a timer or is there a better way?
for example, i want to display li one at a time. when i hit the end i want to go back to top and start again.
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.
Not sure if I understood your question correctly, but I’ll have a stab at it.
Timers are useful when performing animations, or if you think there’s going to be a lot of iterations (so as to not hog the thread).
If you’re just creating a few LI elements and appending them to a UL element, and you don’t want them to be shown incrementally (like in an animation), just use a for loop.