WordPress – jQuery on click on a child element add class to a non-direct parent
I am using the code below to add a class to my menu section when I hover an item on my menu : <script> jQuery(document).ready(function() { jQuery('.has-children').hover(function(){ jQuery('.header-jr').addClass('br-top-only'); },function(){ jQuery('.header-jr').removeClass('br-top-only'); }); }); </script> It works great but now I need…