Incrementing one of the classnames of an element with jQuery
<p>I have a number of div elements with three class names each. There is an image inside each one. They're consecutively numbered (<code>i1, i2, i3</code>...) through class names. The class names are something like <code>"img small i14"</code>. I need to increment the numbers of these class names for each element.</p>

<p>So: for each of these div elements I need to change the class starting with <strong>i</strong> - add 1 or subtract 1 from it. Hopefully there is an efficient way of doing this.</p>

<p>The goal of the whole thing is to create a rotating image gallery. I'd much appreciate help, either through helping with the code or offering a better way of approaching the problem. Thank you.</p>
