I have a question in JQuery. I have the following code, example:
<div class="col-sm-2">
<div class="md-checkbox">
<input type="checkbox" id="checkbox1" class="md-check">
</div>
</div>
<div class="col-sm-2" hidden="hidden">
<input type="text" class="form-control" id="form_control_1">
</div>
<div class="col-sm-2" hidden="hidden">
<input type="text" class="form-control" id="form_control_2">
</div>
<div class="col-sm-2" hidden="hidden">
<input type="text" class="form-control" id="form_control_3">
</div>
What I need to do is that when someone checks checkbox1 , it should show the inputs of the divs
that have the hidden attribute.
In this case it would be something like climbing up to the parent of the checkbox , then up to the parent of that div , then set as visible the neighboring divs .
How can I do this?