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 8095499
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 5, 20262026-06-05T21:09:02+00:00 2026-06-05T21:09:02+00:00

I have the following three items displayed side by side: <div class=page-header> <h1 style=line-height:0>Title</h1>

  • 0

I have the following three items displayed side by side:

<div class="page-header">
    <h1 style="line-height:0">Title</h1>
        <ul style="float: right; list-style-type: none;">
    <li><a href="http://test1.com">T1</a></li>
    <li><a href="http://test2.com">T2</a></li>
    <li><a href="#">T3</a></li>
        </ul>
</div>

I want to highlight the item once the user clicked on it (eg. T1). Something similar to how stackoverflow has the blocks like Questions, Tags, Users etc.

  • 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-06-05T21:09:03+00:00Added an answer on June 5, 2026 at 9:09 pm

    Check this out:

    // Start up jQuery
    $(document).ready(function() {
      $('a.nav').click(function(e) {
        e.preventDefault();
        
        $('a.nav').removeClass('current_page');
        
        // Do an ajax call instead
        $('#response').html($(this).attr("href"));
    
        $(this).addClass('current_page');
      });
    });
    * {
      font-family: Verdana;
      font-size: 13px;
    }
    div#wrapper {
      margin: 20px;
    }
    .current_page {
      color: red;
      font-weight: bold;
      text-decoration: none;
    }
    #response {
      width: 300px;
      height: 200px;
      padding: 5px;
      border: 1px dotted #777;
    }
    <script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script>
    <div id="wrapper">
      <a class="nav" href="http://www.google.com">Google</a> |
      <a class="nav" href="http://www.facebook.com">Facebook</a> |
      <a class="nav" href="http://www.stackoverflow.com">Stackoverflow</a> |
      <a class="nav" href="http://www.myspace.com">Myspace</a> |
      <a class="nav" href="http://www.craigslist.com">Craigslist</a>
    
      <p>&nbsp;</p>
      <p>Response:</p>
    
      <div id="response"></div>
    </div>

    So basically, it pushes a class .current_page to the activated anchor tag which imprints that MEMORY ID in the DOM. You would then implement an ajax call to inject content within the page.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Please consider the following three .NET types: I have an interface, an abstract class,
I have the following three files in the same directory: citysim.cpp #include utils.h using
I have the following three arrays and need to create a new two-dimensional array
I have the following three tables. I am trying to inter link (join) among
Let's say I have the following three strings: (section1){stuff could be any character, i
In my project I have the following three interfaces, which are implemented by classes
I have the following code string three() { return three; } void mutate(string& ref)
I have three mysql table from same database Db1. Three tables have following columns.
I have an activity with the following items: Action bar (one imageview, one view
I have following problem. I have created a tab based Application with three Views

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.