antonscie antonscie - 1 year ago 65
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

Answer Source



Also you may simplify the whole thing:

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


Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download