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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 22, 20262026-05-22T15:29:21+00:00 2026-05-22T15:29:21+00:00

I have setup some tabbed navigation on my ASP.NET Masterpage. It is pretty basic:

  • 0

I have setup some tabbed navigation on my ASP.NET Masterpage. It is pretty basic:

    <div id="nav_tabs">
        <div id="home" class="tab selected_tab "><a href="Default.aspx" onclick="tabSwitch('home');">Home</a></div>
        <div id="products" class="tab other_tab "><a href="ProductList.aspx" onclick="tabSwitch('products');">Products</a></div>
        <div id="demos" class="tab other_tab "><a href="Demos.aspx" onclick="tabSwitch('demos');">Demos</a></div>
    </div>

And I use the following jQuery to set the current tab:

  <script type="text/javascript" >
      function tabSwitch(tab) {
          $('.tab').css("background-image", "url('/Images/other_Tab.png')");
          $("#" + tab).css("background-image", "url('/Images/Active_Tab.png')");
      }
  </script>

For some reason when I click on one of the tabs, the changes are briefly shown, but then they revert back to their original state. Is this a side effect of the MasterPage? Am I just doing something wrong?

  • 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-22T15:29:22+00:00Added an answer on May 22, 2026 at 3:29 pm

    Well, the problem is that after jQuery changes css page reload occurs. And of course elements return to their original state.

    Master page is just a convenient way to construct pages, it’s not a frameset. So you need to either implement your style changes on the server side or persist your changes somehow (for example save # of tab in a cookie and update css on every reload based on that cookie). I think in your case server side method is better.

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

Sidebar

Related Questions

I have an ASP.Net 3.5 application in which I would like to setup some
I'm using the Drupal Quiz module, and have setup some basic quizzes and stuff
I have setup some basic code that triggers on focus of various input fields:
I've created some MbUnit Test Fixtures that have SetUp methods marked with the SetUp
I am trying to implement performance testing on ActiveMQ, so have setup a basic
I have setup some routes and they work so if i put localhost/MyWebApp/Reservas ......
I have some setup code in my functions.php file that sets permalinks and adds
I have setup a basic WCF client/server which are communicating via Named pipes. It
Have following setup: MainActivity class - extends activity MyLayout class - extends View Prefs
I use Eclipse PDT and have setup some PHP projects. The resources for one

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.