Currently using the following to select all checkboxes when a checkbox with id #checkall is checked.
<script type="text/javascript">
$(function () {
$('#checkall').click(function () {
$(this).parents('fieldset:eq(0)').find(':checkbox').attr('checked', this.checked);
});
});
</script>
How can i change this to allow for the use of a button, instead of a checkbox? Ive tried switching them out in the html, but it doesnt seem to work.