Aucun retour sur $ (‘input: case à cocher’). Change (function () {?

Je teste une deuxième solution qui m’a été fournie ici, pour vérifier et enregistrer chaque case à cocher qui a été cochée. La première solution fonctionne à merveille, mais la seconde solution plus efficace ne fonctionne même pas.

for (x in aL.results) { aLIds.push(aL.results[x].listing_id); aLTitles.push(aL.results[x].title); aLQuantities.push(aL.results[x].quantity); aLDescs.push(aL.results[x].description); aLTaxPaths.push(aL.results[x].Tax_path); aLTaxIds.push(aL.results[x].Tax_id); aLTags.push(aL.results[x].tags); aLUrls.push(aL.results[x].url); aLPrices.push(aL.results[x].price); aLViews.push(aL.results[x].views); aLHearts.push(aL.results[x].num_favorers); $('#tblListings').append( '' + '' + '' + aLQuantities[x] + '' + '' + aLTitles[x] + '' + '' + aLPrices[x] + '' + '' + aLViews[x] + '' + '' + aLHearts[x] + '' + '' ); } $('input:checkbox').change(function() { alert('ah'); var uLIndex = $('input:checkbox:checked').map(function() { return this.value; }).get(); console.log(uLIndex); });