I have three division and each division contain 3 checkboxes.
<div class="options">
<div class="offers" >
<form action="" >
<div class="multiselect">
<div class="selectBox click">
<select class="select">
<option>Select an option</option>
</select>
<div class="overSelect"></div>
</div>
<div id="open" class="box">
<input type="checkbox" id="one"/><label for="one" class="i">First checkbox</label>
<input type="checkbox" id="two"/><label for="two">Second checkbox </label>
<input type="checkbox" id="three"/><label for="three">Third checkbox</label>
</div>
</div>
</form>
</div>
<div class="offers">
<form action="">
<div class="multiselect" >
<div class="selectBox click">
<select class="select" >
<option>Select an option</option>
</select>
<div class="overSelect"></div>
</div>
<div id="open" class="box">
<label for="one"><input type="checkbox" id="one"/>First checkbox</label>
<label for="two"><input type="checkbox" id="two"/>Second checkbox </label>
<label for="three"><input type="checkbox" id="three"/>Third checkbox</label>
</div>
</div>
</form>
</div>
<div class="offers">
<form action="">
<div class="multiselect">
<div class="selectBox click">
<select class="select">
<option>Select an option</option>
</select>
<div class="overSelect"></div>
</div>
<div id="open" class="box">
<label for="one"><input type="checkbox" id="one"/>First checkbox</label>
<label for="two"><input type="checkbox" id="two"/>Second checkbox </label>
<label for="three"><input type="checkbox" id="three"/>Third checkbox</label>
</div>
</div>
</form>
</div>
</div>
I have used label so that if i click on label checkbox get check. But its happening only in first div and in other div if click on label changes occur in first div. And also if i click on label on other div other than first checkbox are not checking
Aucun commentaire:
Enregistrer un commentaire