antonscie antonscie - 5 months ago 31
jQuery Question

jquery each function for menu

hello guys i have a menu. i want to add a toogle animation to each parent menu.
but curently i stuck, because when i click the parent menu. all parent menu show their child menu.
i think i need a jquery each function, but i dont know how to implement with my case.
heres my code

$(".menu-item-has-children").find("i").addClass("fa fa-plus-circle toogle-icon");

heres jsfiddle




Also you may simplify the whole thing:

$('<i class="fa fa-plus-circle toogle-icon"></i>')