Display Child Categories On Click
On my wordpress website I have a menu that displays the subcategories for each categorie. What I want to do is to hide the subcategories by default and display them only when I cli
Solution 1:
Use Css to hide them:-
ul.children{
display:none;
}
And then use jQuery to open them:-
jQuery('li.cat-item').on('click',function(){
$('ul.children').hide();
$(this).find('ul.children').show();
});
Post a Comment for "Display Child Categories On Click"