Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6832643
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T22:53:00+00:00 2026-05-26T22:53:00+00:00

this is probably a simplistic question and I had tried to solve it my

  • 0

this is probably a simplistic question and I had tried to solve it my best provided I am not that versatile in CSS, so the task at hand is to keep the state of a clicked link on the tree link view.

Here is the code to generate the html:

  @helper NavigationTree(SiteMapNodeCollection childrenOf, SiteMapNode root) {

     if(root.ParentNode == null && root != null && childrenOf == null) { 
      //check if it's the root and dont bother doing the itteration, just make a     recursive call.
    <ul id="navigationTree">
        <li class="first">
            <a href="@root.Url" class="current">@root.Title</a>   
            @NavigationTree(root.ChildNodes, root)
        </li>
    </ul>
} else { //if not the root, take it and go one level down for each children node        using     recursion.
    <ul>
        @foreach(SiteMapNode node in childrenOf) {
            <li>

                   <a href="@node.Url" class="masterRecord">@node.Title</a> 


                @if (@node.ParentNode.Key == @root.Key)
                {  
                    @NavigationTree(node.ChildNodes, node)
                }       
            </li> //close the <li>
        }
    </ul> //close the <ul>
}

}

How do I keep the clicked link on the menue underlined untill the user clicks the next then the next one becomes that and the prev one goes to the regular state. Is it possible to do throgh CSS or jQuery is a must?

Mecri!

HTML

  <div id="categories">
            <ul id="navigationTree">
             <li class="first">
                 <a href="/Home/Index" class="current">Application Administration</a>   
                        <ul>
                          <li>

                            <a href="/Home/MasterRecords" class="masterRecord">Master Files</a> 


                        <ul>
                          <li>

                            <a href="/Application/Index" class="masterRecord">Application Master</a> 


                     <ul>
                       <li>

                         <a href="/Application/Create" class="masterRecord">Create New</a> 


                    <ul>
                   </ul>                 
               </li>                 
               <li>

                   <a href="/Application/Details" class="masterRecord">View</a> 


              <ul>
                </ul>                 </li>         </ul>                 </li>                 <li>

                   <a href="/Facility/Index" class="masterRecord">Facility Master</a> 


    <ul>
            <li>

                   <a href="/Facility/Create" class="masterRecord">Create New</a> 


    <ul>
    </ul>                 </li>                 <li>

                   <a href="/Facility/Details" class="masterRecord">View</a> 


    <ul>
    </ul>                 </li>         </ul>                 </li>                 <li>

                   <a href="/Department/Index" class="masterRecord">Department Master</a> 


    <ul>
            <li>

                   <a href="/Department/Create" class="masterRecord">Create New</a> 


    <ul>
    </ul>                 </li>                 <li>

                   <a href="/Department/Details" class="masterRecord">View</a> 


    <ul>
    </ul>                 </li>         </ul>                 </li>                 <li>

                   <a href="/JobCode/Index" class="masterRecord">Job Code Master</a> 


    <ul>
            <li>

                   <a href="/JobCode/Create" class="masterRecord">Create New</a> 


    <ul>
    </ul>                 </li>                 <li>

                   <a href="/JobCode/Details" class="masterRecord">View</a> 


    <ul>
    </ul>                 </li>         </ul>                 </li>                 <li>

                   <a href="/EmployeeLevel/Index" class="masterRecord">Employee Level Master</a> 


    <ul>
            <li>

                   <a href="/EmployeeLevel/Create" class="masterRecord">Create New</a> 


    <ul>
    </ul>                 </li>                 <li>

                   <a href="/EmployeeLevel/Details" class="masterRecord">View</a> 


    <ul>
    </ul>                 </li>         </ul>                 </li>                 <li>

                   <a href="/EmployeeType/Index" class="masterRecord">Employee Type Master</a> 


    <ul>
            <li>

                   <a href="/EmployeeType/Create" class="masterRecord">Create New</a> 


    <ul>
    </ul>                 </li>                 <li>

                   <a href="/EmployeeType/Details" class="masterRecord">View</a> 


    <ul>
    </ul>                 </li>         </ul>                 </li>         </ul>                 </li>                 <li>

                   <a href="/Role/Index" class="masterRecord">Role Management</a> 


    <ul>
            <li>

                   <a href="/Role/Create" class="masterRecord">Create</a> 


    <ul>
    </ul>                 </li>                 <li>

                   <a href="/Role/Search" class="masterRecord">Search</a> 


    <ul>
    </ul>                 </li>                 <li>

                   <a href="/Role/Assign" class="masterRecord">Assign Applications to Roles</a> 


    <ul>
    </ul>                 </li>         </ul>                 </li>         </ul> 
        </li>
    </ul>

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-26T22:53:01+00:00Added an answer on May 26, 2026 at 10:53 pm

    try something like this. it uses css and jquery

    <script type='text/javascript'>
    
        $('.masterRecord').click(function(){
               $('.masterRecord').css('border','none');
               $(this).css('border-bottom','1px solid #F00');
            }
        });
    
    </script>
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a feeling that this probably is not possible using strictly CSS, but,
This probably has a simple answer, but I must not have had enough coffee
First I know that this probably sounds like it isn't the best way to
I know this probably really simple but Im not sure what im doing wrong...
Ok, this probably has a really simple answer, but I've never tried to do
I've been working all day and I somehow can't get this probably easy task
This probably sounds like a silly question to seasoned Rails developer. Do I need
This probably is one of the easiest question ever in C programming language... I
This probably isn't the best way, but I am currently retrieving the amount of
This probably sounds like a stupid question, but I'm going to give it a

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.