Start a new discussion

To start a new discussion please visit the discussions section of the GitHub home page of the project.

Discussions on GitHub

You can also search our old self-hosted forums for any useful information below but please note that posting new content here is not possible any more.

RonP

Forum Replies Created

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • in reply to: ItemActive on page load with extra PHP vars #8644
    RonP
    Participant

    That is ideed what I did:

    Added extra ID to <a> element of menu items (id=menuItem_1, id=menuItem_2, id=menuItem_3, etc.)

    Then alter style of menu item via js at the end of php script:

    echo("
      <script> 
    	$(document).ready(function() { 
    	  $('#menuItem_4').css({'background-color': '#2d8ebb', 'color': '#fff'});
    	}); 
      </script>
    ");
    in reply to: ItemActive on page load with extra PHP vars #8512
    RonP
    Participant

    Sorry code was lost… Here the examples:

    index.php?id=1 activates the corresponding menu-item correctly.
    But when the same page is loaded with extra vars, menu-item is not activated:

    index.php?id=1&project=5 > menu-item index.php?id=1 not activated
    index.php?id=1&project=5&var=foo > menu-item index.php?id=1 not activated

Viewing 2 posts - 1 through 2 (of 2 total)