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

  • koolika


    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

    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)
  • kjodle


    Please put your code samples between backticks. Your code is breaking this page.

    Could a moderator fix this so we can make sure we are seeing all of his code? Thanks!

    Moderator Ipstenu (Mika Epstein)


    Lead Plugin Wrangler

    Fixed but I don’t know if the forum didn’t eat some :/




Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Adding a class to sub-menu’ is closed to new replies.