The Support Forums will be in read-only mode for a scheduled maintenance window on 01 September 2016 14:00 UTC - 20:00 UTC. More information.

Javascript function for current class (1 post)

  1. vince23
    Posted 3 years ago #

    I ve created a text widget with links.

    I m trying to highlight the site I m currently on

    (current class).

    I wanted to achieve this by pasting the following code in my

    but it doesnt seem to work.

    any idea why ?

    <script type="text/javascript">
    $(function() {
         var pgurl = window.location.href.substr(window.location.href
         $("#custom-side ul li a").each(function(){
              if($(this).attr("href") == pgurl)

Topic Closed

This topic has been closed to new replies.

About this Topic


No tags yet.