I'm trying to ('.hidden-textbox').css('visibility', 'visible') for input's that are checked. For example, Question 1, Question 4, and Question 5 should have their input textbox (.hidden-textbox) set to visible. How can I do that in jQuery and javascript?
I have some code like this:
<style>
.hidden-textbox {
visibility: hidden;
}
</style>
<div class="question">Question 1: <input type="checkbox" checked><input type="text" class="hidden-textbox"></div>
<div class="question">Question 2: <input type="checkbox"><input type="text" class="hidden-textbox"></div>
<div class="question">Question 3: <input type="checkbox"><input type="text" class="hidden-textbox"></div>
<div class="question">Question 4: <input type="checkbox" checked><input type="text" class="hidden-textbox"></div>
<div class="question">Question 5: <input type="checkbox" checked><input type="text" class="hidden-textbox"></div>
Aucun commentaire:
Enregistrer un commentaire