Check all not working? Gotta be simple

Check all not working? Gotta be simple

jQuery really ain't my thang, but I can't figure out for the life of me why this isn't working:

<script type="text/javascript">
$('#checkAllAuto').click(
      function()
         {
         $("input[name='checkall']").attr('checked', $('#checkAllAuto').is(':checked'));   
         }
      )   
</script>


Then I have some checkboxes...

<input type="checkbox" name="checkAllAuto" id="checkAllAuto"> Check All
<input type='checkbox' name='checkall' value=715>
<input type='checkbox' name='checkall' value=713>


Any help would be much appreciated so I can shoot myself.