This code is not working. this+'>a' isn’t a valid syntax.
So, how can I add/remove a class in a child of this? In this case an a element.
jQuery(function ($) {
$("nav.menu>ul>li").hover(
function () {
$(this+'>a').addClass("hover_triangle");//error
},
function () {
$(this+'>a').removeClass("hover_triangle");//error
});
});
I can’t do nav.menu>ul>li>a because will select all a elements in menu.
and with the full code: