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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 18, 20262026-06-18T05:13:27+00:00 2026-06-18T05:13:27+00:00

I have four jquery sliders in a page with these scripts: $(document).ready(function(){ $(#information).click(function(){ $(#information_show).slideToggle(medium);

  • 0

I have four jquery sliders in a page with these scripts:

$(document).ready(function(){
  $("#information").click(function(){
    $("#information_show").slideToggle("medium");
  });
});

$(document).ready(function(){
  $("#menu").click(function(){
    $("#menu_slide").slideToggle("medium");
  });
});

$(document).ready(function(){
  $("#books").click(function(){
    $("#books_toggle").slideToggle("medium");
  });
});

$(document).ready(function(){
  $("#content").click(function(){
    $("#content_div").slideToggle("medium");
  });
});

So for example when I click on the div #information the #information_toggle is visible. I wounder if there is any way to make the sliders only show one at once.

Example: When click on #books, the #books_toogle show. Now when click on #menu the #menu_slide shows, at the same time the #menu_slide shows #books_toggle toogle/close automatic. So only one hidden div will show at once.

  • 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-18T05:13:28+00:00Added an answer on June 18, 2026 at 5:13 am

    It would help to see your html, but it is easy to do this in an ugly way:

    $("#information").click(function(){
        $("#information_show").slideToggle();
        $("menu_slide, books_toggle, content_div").slideUp();
    });
    

    However, a much prettier way to do this would be with classes:

    $(".slider").on('click', function () {
        var $assocDiv = $(".slider_show").eq($(this).index));
        $assocDiv.slideToggle();
        $(".slider_show").not($assocDiv).slideUp();      
    });
    

    Regardless, you only need one $(document).ready, which can just be written as $(, and 'medium' is already the default animation speed.

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

Sidebar

Related Questions

I am setting up a page with jQuery's Cycle plugin and have four divs
I have a single page jQuery Mobile app with four data-role='pages' in place; so,
I'm working with Jquery in Drupal. I have sets of four blocks that all
I need a script, preferably jquery, to do the follwoing: I HAVE FOUR LITTLE
I'm using four JQuery Uploadify browse buttons on a page that's calling the Uploadify
I want to conduct a POST request via jQuery. Say I have four Javascript
I have four inputs in my web page. The requirement is when the user
I have a function in jQuery and I want that where that function is
In jQuery: Scenario ** - I have four Divs that have hover effects. -
I have a website with different sections. I have jQuery to slide between these

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.