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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 12, 20262026-06-12T04:19:21+00:00 2026-06-12T04:19:21+00:00

I want to do two things using a countdown in jQuery. I have looked

  • 0

I want to do two things using a countdown in jQuery. I have looked at the delay method but it won’t be applied to an element like shown in the docs.

What I want to do is wait 2 hours and then 30 seconds before the timeout do function A and then after that do function B.

During function A I will be showing a modal where I want to show a message saying you have 30 seconds to respond. And show the 30 counting down before executing function B.

What would be the best and simplest way of doing all of this?

Thanks

  • 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-12T04:19:22+00:00Added an answer on June 12, 2026 at 4:19 am

    If you don’t want to get too messy code-wise, use a countdown plugin such as jCounter and run it for 2 hours and set its fallback (fallback A) to start another instance of the countdown for 30 seconds with the second fallback (fallback B).

    Example:

    $('.countdown').jCounter({
      customDuration: 60*60*2, //2 hours
      format: 'hh:ss', //display hours and seconds
      fallback: function() { $('.timeLeft').jCounter({ // fallback A
        customDuration: 30, // run for 30 seconds
        format: 'ss', // display only seconds
        fallback : function() { alert("30 seconds are up!") } // fallback B
      }); }
    });
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a small app using Drive.Info. I want to do two things. Check
I would like to have two things happen at once when I click on
I'm using Tab Layout and I want to do two things: set the color
I want to do two things in my browser: Load a text file into
First of all I want to mention two things, One: My code isn't perfect
I want to apply a different hyper link style to the following two things:
I have an action inside my controller class and I want two different routes
I have a UITextView and I want have two buttons. When the user taps
Basically, I want to do two things: I want to know if there is
using mysql and php, I have two tables, I'm french so the table names

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.