Is it possible to change an items class or ID based on some type of timer? Every 1500ms it would go to hey-there-1, then 1500ms later hey-there-2.. etc.. something that I could possibly control how many intervals it goes through..
- hey-there
- hey-there-1
- hey-there-2
- hey-there-3
- (back to beginning) hey-there
- etc
Thanks
A plugin function as such will allow you to do what you want:
Then you can simply call it using the following:
Simply modify the parameters as you wish. First parameter is an array of classes to rotate, second is the interval to rotate them to, and the third is the maximum number of iterations. If set to
0
, it iterates ad-infinitum.See:
I would suggest against changing the ID of the element - instead go for "frame1/frame2/frame3" classes.