Little bit of help with loops
Hey folks,
was hoping someone could give me little hand with a loop function, I can't seem to get it right.
I'm trying to do the following and I was wondering how it's done.Do I need to use the .each() function?:
for(i=0; i<=10;i++) {
$(document).ready(function(){
$(#myform").validate({
rules: {
"field"+i: { required: true } //important bit
}
});
});
}
How would I go about doing this in jQuery?
Thanks for any help!