Okay
  Public Ticket #891261
nav menu item additional class
Closed

Comments

  •  3
    Christopher started the conversation

    Hi .. I added a menu item to the main nav, in "button with solid color" style. This is a general "request a demo" type cta button, and it triggers a javascript popup form I use throughout the site. In order to trigger the popup, I have to give the button link a class of .trigger_popup. 

    The issue I am having is that you provide a very nice "additional class" box for the nav item, but the class is applied to the <li> and not the <a> itself .. (see below) .. is there a way I can somehow manually apply the class to the link and not the <li>?

    code generated:

    <li id="menu-item-9897" class="trigger_popup menu-item menu-item-type-custom menu-item-object-custom button_solid_color menu-item-9897">
    <a href="http://#3" style="padding-bottom: 29px; padding-top: 1px;">REQUEST CONTACT</a>
    </li>

    Thanks for any help/suggestions here!

    -Chris

  •  8,998
    Tahir replied

    Hey ,

    add it to the Google Analytics Section in the Salient Theme Options Panel -> General Settings Section :

    <script type='text/javascript'>
    jQuery( document ).ready(function() {
     jQuery('li#menu-item-9897 a').addClass('trigger_popup');
    });
    </script>

    Bes.t


    ThemeNectar Support Team 

  •  3
    Christopher replied

    Sorry to just now come back, but wanted to say thank you for that .. it worked, and I've used it in different ways throughout the site (for example, the CTA button link). 

    Awesome stuff. Can mark this ticked as closed/solved. :)