Im trying to add a number to the classes hand. Each one of them are suppose to have a number that will increase by one the further you go down the page. I thought I could do this with the FOR loop but I don’t know how!
This is the code I have so far but I dont know what to put between the FOR loop:
$(".hand").each(function(){
var i = 0;
for (i=0;i<=20;i++){
}
});
Any Ideas?
Edit:
HTML Exampe:
<div class="hand effect"><br>
<div class="outer">
<a href="" class="title">Text</a>
<span class="inner">
Text More Text.
</span>
</div>
</div>
$.each provides the index for you.
Then you can style each of the span tags using the class
index