How about changing to `checkboxes.each(function(i, e) {` and using `e` instead of a new variable?