I'm trying to get subcategory checkboxes to only display once the relevant parent checkbox has been selected.
At the moment I'm using the following code:
<script type="text/javascript">
$(document).ready(function () {
$("#listing_category-401 .children").css("display", "none");
$(".option").change(function () {
if ($('checkbox[id="in-listing_category-401"] :checked').val() == "true") {
$("#listing_category-401 .children").slideDown("fast");
}
});
});
Aucun commentaire:
Enregistrer un commentaire