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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 13, 20262026-06-13T11:03:49+00:00 2026-06-13T11:03:49+00:00

I have a series of buttons that trigger a JQuery animation, where panels slide

  • 0

I have a series of buttons that trigger a JQuery animation, where panels slide up below the bottom of the page. The panels are absolutely positioned beloe the page, and when a button is clicked, it’s corresponding panel animates up.

The functionality works great, but I only want to be able to show one panel at any given time.

My HTML is:

<div id="footerNav">
<a class="button" id="b1" href="#"><span></span>Upcoming Events</a>
<a class="button" id="b2" href="#"><span></span>From the Blog</a>
<a class="button" id="b3" href="#"><span></span>Global Leaders</a>
<a class="button" id="b4" href="#">Watch Video</a>
</div>

<div id="paneb1" class="pane"></div>
<div id="paneb2" class="pane"></div>
<div id="paneb3" class="pane"></div> 

My Jquery is:

$("a.button").toggle(function(){
     idClick = $(this).attr("id");
     newSelector = $("#pane"+idClick);
     newSelector.animate({ 'bottom' : 99});
     $(this).addClass("activeBtn");
}, function(){
     newSelector.animate({ 'bottom' : -275});
     $(this).removeClass("activeBtn");
});

I tried using the not selector like so, but it did not work:

$(".pane:not(newSelector)").animate({ 'bottom' : -275});

What do I need to do here in order to animate any OTHER panel back down to its original position when a button is toggled?

  • 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-13T11:03:50+00:00Added an answer on June 13, 2026 at 11:03 am

    You may use not() method instead of :not() selector:

    $(".pane").not(newSelector).animate({ bottom : -275 });
    

    Note, it is better to use local variables instead of the global ones, so consider using var keyword when defining a new variable:

    var newSelector = $("#pane" + idClick);
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a series of radio buttons on my page that, when checked, establish
I have a series of buttons that display filenames. If I set the Text
I have a series of divs that slide down using -webkit-transform from a negative
I have custom View I've written that hooks up a series of buttons to
I have a user control that generates a series of arrow buttons. I want
I have managed to produce a series of three buttons on an index page
My goal is to create a series of clickable buttons that each have a
I have a series of buttons (A,B,C,D) that toggle like radio buttons, only one
I have a ButtonBar w/ a series of buttons that will each have a
I have a series of buttons on my website that have I want to

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.