Answer the question
In order to leave comments, you need to log in
Yii checkboxlist ajax processing?
there is suppose checkboxlist where I display data by nesting levels. something like this,
and when I click on the check of a descendant, I want all the ancestors to have a check box.
Answer the question
In order to leave comments, you need to log in
as an option, enter an attribute of the type data-parent-id and data-id for each checkbox, and when clicking, track the value of data-parent-id and, accordingly, mark the checkbox with data-id equal to the data-parent-id of the checked checkbox, well, further along the links tag other parents.
Naming the data-parent-id and data-id attributes is not necessarily the case, but jQuery has a jQuery.data() function that works with these attributes, making it easier
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question