I’m trying to hide checkboxes depending on a click to another checkbox, it’s working for one row, but I want it for a number of rows
(for instance)
If I click checkbox 1, checkbox 2, 3, 6 and 7 should hide
If I click checkbox 2, checkbox 1, 3, 5 should hide
–EDIT 🙂
Hello again,
Thanks a lot for all the help, finally it’s working with multiple classes and event.target
look at http://jsfiddle.net/MH8e4/163/
— last EDIT 🙂
I will use the solution from Muleskinner, because its not necessary to build up different classes and it is easier for dynamic forms. I’ll added something to remove checked attributes if the checkbox hide
Interesting problem – This would be a good place to use the new HTML5 data attributes.
Take a look at this, should be pretty self-explaining (jsFiddle here):
jQuery
HTML
Happy coding!