I am trying to write a function that applies an action through all <strong> elements, and when finishes with one, applies it to the next one.
Also, at the end, it must start again with the first <strong>.
I am sure I remember reading about a jquery function for doing this, but I cannot remember it.
For it to infinitely loop, you’ll need to use something like
setInterval()so it doesn’t block other javascript from executing.I assume that’s what you mean when you say “Also, at the end, it must start again with the first again.”
Here’s an example: http://jsfiddle.net/34sFN/
Another example, somewhat based on your comment: http://jsfiddle.net/34sFN/1/