Your description of your HTML isn't very clear, but none the less this
could work:

$("selector for header checkboxes").click(function() {
      var chk = this;
      $("input[id^='" + chk.id + "_item']").each(function()
{ this.checked = chk.checked; });
})

On Mar 25, 12:12 pm, Andy <adharb...@gmail.com> wrote:
> Hey guys,
>
> I have a table where the header has check boxes so if you click on
> that, it will select all of the other checkboxes in that row.   The
> issue I have, it's not a select all checkboxes, but ones that have a
> specific naming convention.   Example.  If my header is named
> ckb_category1 I need to be able to find all checkboxes that are in
> that column that have naming like ckb_category1_item1.  Then each row
> following would have a different item id, but keep the category1 the
> same.   Is there a pattern I can use that would work for this?
>
> Thanks!

Reply via email to