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

  • Home
  • SEARCH
  • 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 6036825
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T05:58:55+00:00 2026-05-23T05:58:55+00:00

I want to animate two jquery OBJECTS at the same time (using the jquery

  • 0

I want to animate two jquery OBJECTS at the same time (using the jquery slideUp method)

I have two divs that have already been ‘cached’ into a variable like so:

var div1 = $('body').find('#someId');
var div2 = $('body').find('#someOtherId');

I have cached these because they take a considerable amount of processing to find due to the page layout (using framesets and frames…don’t ask).

Anyway,

If I do the slide animation like below, they are not in perfect sync (they are lined up so you can easily see it visually)

div1.slideUp(500);
div2.slideUp(500);

So I tried wrapping it like so,

$(div1, div2).slideUp(500);

but only div1 slides.

Is there anyway to get this to work while still maintaining the cached objects?

Edit: Giving the div’s a class name does not trigger the animation. I think it may have something to do with the fact that I’m using framesets. The jquery code is in the top frame and so it will not look into other frames for the class. That is why I cached the objects

  • 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-23T05:58:56+00:00Added an answer on May 23, 2026 at 5:58 am

    You can do what you want like this:

    div1.add(div2).slideUp(500);
    

    I made a quick jsfiddle you can check out here.

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

Sidebar

Related Questions

I have two divs that have 50% width each. I want to make it
I have a selection of elements in a jQuery object. I want to animate
I want to use .animate to change colors when .bind('click') is fired, using jquery
I have a CALayer that I want to animate across the screen. I have
Hi I'm new to JQuery. I have an two issues that I can't figure
I have these two things happen in my jQuery-animated website: $('#myFirstDiv').animate({top: 15%}, 3000); $('#mySecondDiv').animate({bottom:
I have two DIVs, first one has a link in it that contains the
I have two jquery scripts on one page that both target on-site links via
I have a comments section on my websites that uses jQuery to animate comments
I'm trying to execute two events using the same class in jquery... having one

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.