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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T23:23:28+00:00 2026-05-26T23:23:28+00:00

Here is my problem. I am coding a website for a meeting hall. The

  • 0

Here is my problem. I am coding a website for a meeting hall. The client wants a countdown to the next meeting on the home page. I figured I would use The Jquery Countdown plugin on http://keith-wood.name/countdown.html as it has everything I need. But as the meeting hall has multiple meetings each day I need it to countdown to the next meeting on expiration. I know the dates and times of all the meetings each day but I don’t know how I can switch to the next meeting on expiration. Any thoughts?

  • 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-26T23:23:28+00:00Added an answer on May 26, 2026 at 11:23 pm

    This is not a 40Kb solution like the Keith Wood’s one. But, after 5 hours playing with code, I came up with this very versatile solution:

    <script type='text/javascript' src='jquery-1.5.1.min.js'></script>
    <script type='text/javascript'>
    
        function countDown(eventID) {
            var $this, h, m, s;
            $this = $('#event'+eventID);
            s = parseInt($this.text().substr(6),10);
            m = parseInt($this.text().substr(3,5),10);
            h = parseInt($this.text().substr(0,2),10);
            s--;
            m = (s < 0) ? --m : m;
            h = (m < 0) ? --h : h;
            if (h < 0) {
                $this.css('display','none');
                $this.parent().slideUp('slow');
                $this.parent().remove();
            }
            s = (s < 0) ? 59 : s;
            m = (m < 0) ? 59 : m;
            $this.text(((h < 10) ? '0'+h : h)+':'+((m < 10) ? '0'+m : m)+':'+((s < 10) ? '0'+s : s));
            setTimeout('countDown('+eventID+')',1000);
            $('.counter').first().show();
        }
    
        $(document).ready( function() {
            var eventID = 0; 
            $('#nextEvents div').each( function () {
                var nextEventH = parseInt($(this).text().substring(0,2),10);
                var nextEventM = parseInt($(this).text().substring(3,5),10);
                var nextEventS = $(this).text().substring(5,7);
                nextEventH = (nextEventS === 'PM') ? nextEventH + 12 : nextEventH;
                nextEventS = 0;
                var curTime = new Date();
                //curTime = curTime.getHours()+':'+curTime.getMinutes()+':'+curTime.getSeconds();
                nextEventH = Math.abs(nextEventH - curTime.getHours());
                nextEventH = (nextEventH < 10) ? '0'+nextEventH : nextEventH;
                nextEventM = Math.abs(nextEventM - curTime.getMinutes());
                nextEventM = (nextEventM < 10) ? '0'+nextEventM : nextEventM;
                nextEventS = Math.abs(nextEventS - curTime.getSeconds());
                nextEventS = (nextEventS < 10) ? '0'+nextEventS : nextEventS;
                $(this).append("<div class='counter' id='event"+eventID+"' style='display:none; "+
                    "position:absolute; top:0; right:0; width:auto; height:auto; color:red; ' >"+
                    nextEventH + ':' + nextEventM + ':' + nextEventS+"</div>");
                countDown(eventID);
                eventID++;
            });
        });
    
    </script>
    
    </head>
    
    <body>
       <div id='wrapper' style='position:relative; width:600px; height:400px; background-color:#366; color:#EEE; ' >
        <div id='nextEvents' >
         <div style='position:relative; width:100%; display:block; ' >05:12AM - Meeting with department heads</div>
         <div style='position:relative; width:100%; display:block; ' >05:13AM - Meeting with Department of Finances</div>
         <div style='position:relative; width:100%; display;block; ' >05:14AM - Meeting with Human Resources</div>
        </div>
       </div>
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Here's a coding problem for those that like this kind of thing. Let's see
Maddening problem here. When my page loads: <body onload=getClientDateTime();> It runs this function: document.getElementById('ClientDateTime').value=hello
I have a problem coding my website. In Chrome, firefox ect. it shows the
So I'm coding a Greasemonkey script for this website.. Anyway, my problem is I
I'm currently coding a French website. There's a schedule page, where a link on
What is the problem here? (Besides having redundant code). $.getJSON works as expected. However
I have a problem here. My Zend_Forms do not render in view script. Via
I've got a problem here with an MSI deployment that I'm working on (using
Just a small SVN problem here. I setup my own SVN server Setting up
I'm having a strange problem here... I have an ASP.NET 3.5 application that has

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.