$(document).ready(function () { $('#selectAll').click(function (e) { var elements = $('.make_pdf'); // Do something with the elements elements.each(function() { $(this).prop('checked', true); }); }); });