You can use method change()
, I don't know your html but if you put your categories into a iv with id category_n
where n is the value foreach subcategories
$('.form-control').change(function(){
var val = $(this).val();
$('#category_' + val).hide();
});
and your div something like:
<div id="category_1" style="display:none;">
<ul>
<li>subcategory 1</li>
<li>subcategory 2</li>
<li>subcategory 3</li>
</ul>
</div>
<div id="category_2" style="display:none;">
<ul>
<li>subcategory 4</li>
<li>subcategory 5</li>
<li>subcategory 6</li>
</ul>
</div>