The title plus the following example are self-explanatory of what I don't achieve :-) The idea is to replace something + counter in order to make it work.
for (var counter = 1; counter <= 6; counter++) {
var something + counter = $('element' + counter);
(something + counter).removeAttribute('class');
}
You could create an array, but much more simply:
for (var counter = 1; counter <= 6; counter++) {
$('element' + counter).removeAttribute('class');
}
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With