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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 12, 20262026-06-12T20:23:12+00:00 2026-06-12T20:23:12+00:00

I have an onclick that runs two functions, I want the first one to

  • 0

I have an onclick that runs two functions, I want the first one to run and finish, and on finishing start the next one. I have it setup like this right now and they seem to run at the same time:

$("#animate_1").click(function() {
update_1_close();
welcome_open();
});

these are the two functions, I don’t want to combine them, I have several of these and combining them would end up being very complicated

function update_1_close() {
$("#update_1").animate({
    "right": "175px",
    "width": "160px"
}, 450);
$("#update_1_caption").animate({
    "bottom": "0px"
}, 450);
$("#update_1_img").animate({
    "height": "107px",
    "width": "160px"
}, 450);
}

function welcome_open() {
$("#welcome_back_1").animate({
    "top": "345px"
}, 450);
$("#welcome_header_1").animate({
    "top": "35px",
    "left": "20px"
}, 450);
$("#welcome").animate({
    "height": "270px"
}, 450)
$("#stick_figures").animate({
    "top": "215px"
}, 450);
$("#update_1").animate({
    "top": "465px",
    "right": "175px"
}, 450);
$("#update_2").animate({
    "top": "465px"
}, 450);
$("#events").animate({
    "top": "645px"
}, 450);
$("#directions").animate({
    "top": "645px"
}, 450);
}
  • 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-12T20:23:13+00:00Added an answer on June 12, 2026 at 8:23 pm

    They can’t run at the same time — but, they might run one right after the other without the browser having a chance to refresh between them.

    I have no idea what the two functions do, but you might want something more like this:

    $("#animate_1").click(function() {
        update_1_close();
        window.setTimeout(welcome_open, 1000);
    });
    

    That will run update_1_close and then, one second later, run welcome_open

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

Sidebar

Related Questions

I have an onclick function that I want to add an anchor to the
I have a SVG file that I want to extend by adding onclick handlers
I have a form button with an onclick event that runs a simple javascript
I have a bit of ajax that runs onClick for check boxes of a
What works: I have a c executable that runs a TUN/TAP service, and two
I currently have a Service that runs fine when I start it but when
I have a page that runs a jquery onclick event. The event loads an
I have a onclick event that is like: public void OnMyButton_Click(object sender, EventArgs e)
I have an update panel on my page with some links that have onClick
I have a gridview control that has on onclick event bound to every cell.

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.