Viewing 2 replies - 1 through 2 (of 2 total)
  • Thread Starter gloriagoldrea

    (@gloriagoldrea)

    Nevermind, I figured it out.

    If anybody needs to do this:

    Add this to your header:
    <script src=”//ajax.googleapis.com/ajax/libs/jquery/1.11.0/jquery.min.js”></script>

    <script type=”text/javascript”>
    jQuery(document).ready(function($){

    // Get current url
    // Select an a element that has the matching href and apply a class of ‘active’. Also prepend a – to the content of the link

    var url = window.location;

    $(‘a[href=”‘+url+'”]’).parent(‘.dpe-flexible-posts li’).addClass(‘highlight a’);

    });
    </script>

    and then this to your css:
    .dpe-flexible-posts li.highlight a,
    .dpe-flexible-posts li.highlight a:visited {
    color:#339933 !important;
    }

    Plugin Author DaveE

    (@dpe415)

    Hi gloriagoldrea,

    Thanks for posting this issue and a possible solution. I’m looking at what it would take to add that CSS class programmatically. I’ll post back to this thread if a future release adds this capability.

    Thanks again!

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Current nav item highlighted?’ is closed to new replies.