automatically check boxes in jquery accordion -


i using jquery accordion 1 check box in header section tag. within content area related header have several elements contain check boxes.

if check box checked in header element check boxes in content area header.

i know id of header element "ui-accordion-accordion-header-0" , content aria-labelledby="ui-accordion-accordion-header-0" corresponds id of header.

can point me in direction either tutorial or example of how can this.

since there no html given, tried understand problem assuming html this

input type="checkbox" id="ui-accordian-accordian-header-0"/> <hr/>  <input type="checkbox" class="ui-accordian-accordian-header-0"/> <input type="checkbox" class="ui-accordian-accordian-header-0"/> <input type="checkbox" class="ui-accordian-accordian-header-0"/> <input type="checkbox" class="ui-accordian-accordian-header-0"/> 

using following code, can check or uncheck header checkbox

$("#ui-accordian-accordian-header-0").change(function() {     var id = $(this).attr("id");     var items = $("." + id);      this.checked ? items.prop("checked", true) : items.prop("checked", false); }); 

heres fiddle demoing concept: http://jsfiddle.net/seyqu/ should enough on way.


Comments

Popular posts from this blog

Why does Ruby on Rails generate add a blank line to the end of a file? -

keyboard - Smiles and long press feature in Android -

node.js - Bad Request - node js ajax post -