jQuery add hover class to parent anchor for drop-down

    [javascript]
    // make hover state active on parent anchor
    $(‘.block-menu-block.block ul.menu li ul’).hover (
    function () {
    $(this).parent(‘.expanded’).children(‘a’).addClass("dd-active");
    },
    function () {
    $(this).parent(‘.expanded’).children(‘a’).removeClass("dd-active");
    }
    );
    [/javascript]

    Leave a Reply