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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 15, 20262026-05-15T01:25:17+00:00 2026-05-15T01:25:17+00:00

Sorry if this was answered in a previous thread, i couldn’t find one. I

  • 0

Sorry if this was answered in a previous thread, i couldn’t find one.

I have 4 sections: Section1, Section2, Section3, Section4

There are classes for each section, so I am hiding and showing based on the section. The problem is some classes need to be showin in Section1 and Section2.

<div class="section1 section2">
blah blah
</div>

$('a.homeLink').click(function(){
  $('.section1').show();
  $('.section2, .section3, .section4').hide();
  return false;
});

As you see in this case I have a div in two sections, but as i thought would happen it remains hidden due to hiding class section2

work arounds or solutions??

thanks

  • 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-15T01:25:17+00:00Added an answer on May 15, 2026 at 1:25 am

    Well, if section1 always takes precedence over section2, just change the order of the calls:

    $('.section2, .section3, .section4').hide();
    $('.section1').show();
    

    If it’s not that simple, you’ll need to tell us more about what the requirements are.

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

Sidebar

Related Questions

sorry if this question has already been answered somewhere else, but I couldn't find
I'm sorry if this subject has already been answered, but I couldn't find what
all. Sorry if this has been asked and answered already, I couldn't find this
I'm sorry if this question has already been answered but I couldn't find it.
Sorry if this question is answered already, but I didn't find a suitable answer.
Sorry if this has already been answered, but I can't find it if so.
Edit: This was user error (sorry). I have answered it below. I am developing
Sorry if this been answered before, but i can't find an answer here. How
This might have been answered somewhere else if so sorry. I have an dynamic
Sorry if this question has already been answered but I can't find an answer.

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.