D
D
des1roer2015-03-25 13:19:59
JavaScript
des1roer, 2015-03-25 13:19:59

Yii checkboxlist ajax processing?

there is suppose checkboxlist where I display data by nesting levels. something like this,

Q7fKMPm.png

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

1 answer(s)
E
Evgeny Bukharev, 2015-03-25
@evgenybuckharev

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 question

Ask a Question

731 491 924 answers to any question