var dd = Math.floor(Math.random()*99);
$('#a'+ dd + 'b'+ dd + 'c'+ d ).css({...});
for (var i=1; i<100; i++) {
for (var ii=1; ii<100; ii++) {
for (var iii=1; iii<100; iii++) {
$('#a'+ i + 'b' + ii + 'c' + iii).css({...});
}
}
}
I need help changing the div css which id number like div#a + num + b + num + c + num, (num range from 1-99 so that like div#a11b35c9, div#a98b23c17 …)
Random cannot delimit all the number range from (1-99) foreach make judge slowly. How do I make it more efficient? (It is also hard to add a class for each div) Thanks.
1 Answer