dimanche 1 février 2015

Is it possible to convert the following jquery to css?

I have the following snippet:





$(".status").on("click", function() {
if ($(this).prop("checked")) {
$(this).next().show();
} else {
$(this).next().hide();
}
});



<script src="http://ift.tt/1oMJErh"></script>

<div class="info">
<input type="checkbox" class="status" checked />
<div class="infoCont">....lot of stuff......</div>
</div>
<div class="info">
<input type="checkbox" class="status" checked />
<div class="infoCont">....lot of stuff......</div>
</div>



I achieved this result using jQuery but I want to ask if it is possible to achieve the same using pure css.


Thanks in advance.





Aucun commentaire:

Enregistrer un commentaire