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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 11, 20262026-06-11T08:24:02+00:00 2026-06-11T08:24:02+00:00

Im sure this topic has been broached before but here goes. My attemp is

  • 0

Im sure this topic has been broached before but here goes. My attemp is to hide a div and replace it with its counterpart.. As well, I need to add a class to a item while removing a class from the other. This is pretty simple im sure. Thank you

 <script type="text/javascript">
     $(document).ready(function() {
      $('.form_sub').hide();
      });
       </script>
      <script type="text/javascript">
    $('a.theader_t').click(function(){
      $('.form_header').show();
      $('.form_sub').hide();
      $('.theader').addClass('active');
      $('sub_theader').removeClass('active');
    });
    </script>
     <script type="text/javascript">
    $('.sub_theader_t').click(function){
     $('.form_header').hide();
      $('.form_sub').show();
       $('.theader').removeClass('active');
      $('sub_theader').addClass('active');
     });
    </script>

My appologies for not asking the question. The first function works, the last 2 dont work at all. I want a.theader_t to show .form_header while adding the class active but taking active from sub_theader_t if it so applies. Thanks again!

  • 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-11T08:24:04+00:00Added an answer on June 11, 2026 at 8:24 am

    the other two functions are not into the

    $(document).ready(function() { });
    

    and the third function has an error

    $('.sub_theader_t').click(function){ to 
    
    $('.sub_theader_t').click(function(){
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

This topic has been discussed million times before, but let me clarify my needs:
Pretty sure this has been asked already, but I don't know what to search
Now I realise this topic has been covered many times before. However there did
This topic has been covered over and over, but after two days of researching
I know that this topic has been already beaten enough, but I still don't
I'm not sure if this is on-topic or not here, but it's so specific
Im sure this is simple but newbie here. I have 5 URLS cards.php&type=one cards.php&type=two
I'm convinced this has been asked before and have found quite a few resources
I'm not sure if it's possible to give general advice on this topic, but
So I've been working on this today and I'm pretty sure I'm close, but

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.