I'm currently using this little jQuery toggle snippet to show/hide child categories using the wp_list_categories function;

$('.sidebar ul.children').hide(); // Start by hiding child categories

$(".sidebar li.parent-item").hover(function () {
$(".sidebar ul.children").slideToggle("slow");

But currently hovering over any list item with the class parent-item makes every child menu toggle.

Is there a way to make it work only on the list item that is hovered over?

closed as off topic by s_ha_dum, Johannes Pille, fuxia Apr 24 '13 at 15:16

Questions on WordPress Development Stack Exchange are expected to relate to WordPress within the scope defined by the community. Consider editing the question or leaving comments for improvement if you believe the question can be reworded to fit within the scope. Read more about reopening questions here. If this question can be reworded to fit the rules in the help center, please edit the question.



$(".sidebar li.parent-item").hover(function () {

Not the answer you're looking for? Browse other questions tagged or ask your own question.