Support » Fixing WordPress » Adding a class to sub-menu

  • THis solution with JQuery will add class to your sub menu so you can achieve drop down using CSS.

    Add a title in WP to each <li> under the same sub-menu

    JQuery:
    Search for the title and add a class.
    $(document).ready(function() {
    $('a[title="Audio songs sub"]').closest('.sub-menu').addClass('parent1');
    });
Viewing 3 replies - 1 through 3 (of 3 total)
Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Adding a class to sub-menu’ is closed to new replies.