$('input[type=checkbox]').each(function () { sList += "(" + $(this).val() + "-" + (this.checked ? "checked" : "not checked") + ")"; });