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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T11:22:08+00:00 2026-05-26T11:22:08+00:00

I’m trying to have a few divs control the change and to hide or

  • 0

I’m trying to have a few divs control the change and to hide or show other divs.

Been reading a lot, but it is not assisting me. I have wrote a lot to make it work, but there has to be an easier way as query is “write less, do more”. Here is what I have.

$(window).load(function () {
   $('#left2, #left3, #left4, #left5, #left6, #left7, #header-pic, #header-pic2, #header-pic3, #header-pic4, #header-pic5, #header-pic6, #headerpic7').hide(function () {       
   $('#right-01').click(function () {
   $('#coin-slider, #header-pic, #header-pic3, #header-pic4, #header-pic5, #header-pic6, #headerpic7, #left, #left3, #left4, #left5, #left6, #left7').hide();
   $('#left2, #header-pic2').show();
 $('#right-02').click(function () {
 $('#coin-slider, #header-pic, #header-pic2, #header-pic4, #header-pic5, #header-pic6, #header-pic7, #left, #left2, #left4, #left5, #left6, #left7').hide();
 $('#left3, #header-pic3').show();
   $('#right-03').click(function () {
   $('#coin-slider, #header-pic, #header-pic2, #header-pic3, #header-pic5, #header-pic6, #header-pic7, #left, #left2, #left3, #left5, #left6, #left7').hide();
   $('#left4, #header-pic4').show();
 $('#right-04').click(function () {
 $('#coin-slider, #header-pic, #header-pic2, #header-pic3, #header-pic4, #header-pic6, #header-pic7, #left, #left2, #left3, #left4, #left6, #left7').hide();
 $('#left5, #header-pic5').show();
   $('#right-05').click(function () {
   $('#coin-slider, #header-pic, #header-pic2, #header-pic3, #header-pic4, #header-pic5, #header-pic7, #left, #left2, #left3, #left4, #left5, #left7').hide();
   $('#left6, #header-pic6').show();
  $('#right-06').click(function () {
  $('#coin-slider, #header-pic, #header-pic2, #header-pic3, #header-pic4, #header-pic5, #header-pic6, #left, #left2, #left3, #left4, #left5, #left6').hide();
  $('#left7, #header-pic7').show();
                        });
                    });
                });
            });
        });
    });
});
});
  • 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-26T11:22:09+00:00Added an answer on May 26, 2026 at 11:22 am

    Honestly not sure if this answers your question as I am not sure what you want to do less of.

    Your example shows an unneeded amount of elements being selected by ID. Structure your markup using CSS classes. Then use jQuery to select elements by class instead of ID.

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

Sidebar

Related Questions

I have a string like this: La Torre Eiffel paragonata all’Everest What PHP function
I have a French site that I want to parse, but am running into
This could be a duplicate question, but I have no idea what search terms
I know there's a lot of other questions out there that deal with this
I'm trying to convert HTML to plain text. I get many &\#8217; &\#8220; etc.
I have been unable to fix a problem with Java Unicode and encoding. The
I am trying to loop through a bunch of documents I have to put
I have a .ini file as follows: [playlist] numberofentries=2 File1=http://87.230.82.17:80 Title1=(#1 - 365/1400) Example
I am trying to understand how to use SyndicationItem to display feed which is
Basically, what I'm trying to create is a page of div tags, each has

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.