i’m trying to execute css (display: none;) inside script to hide elements from my menu only if one language is active so the body class changes from one language to another and i want the script to check if the body class of X language active to execute css display none else display block.
i already tried it in at the bottom of the footer and i don’t know what let it happens, just do not work…
$('body').hasClass('translatepress-ru_RU') {
$("#menu-item-17728").css("display","none");
}
>Solution :
You can do this with css.
body.translatepress-ru_RU #menu-item-17728{
display:none;
}