4 ms·
Wouldn't var i have to be set to -1: for (var i = -1; els[++i];) ? Otherwise, the alert won't trigger on the first li element.
by heed 16y ago
Wouldn't var i have to be set to -1:
for (var i = -1; els[++i];) ?
Otherwise, the alert won't trigger on the first li element.
- lhorie 16y agoHah, good catch. Was thinking of i++ for some reason. Fixed.