var checkboxes = $(".checkbox"); console.log('checkboxes found:', checkboxes.length); for(var i = 0; i < checkboxes.length; i++) { $(checkboxes[i]).on('change', function(event) { console.log("I have been clicked"); });