Question

(JQuery) Create countdown timer till the end of the summer course.

Let the end of the course be 1-Aug-2019 and whatever time you select.

If you have multiple files, please upload the whole project as a compressed file.

Countdown till the end of the Summer Course 43d 11h 4m 24s

0 0
Add a comment Improve this question Transcribed image text
Answer #1

Countdown till the end of the summer course 35d 7h 42m 36s

<!DOCTYPE html>
<html>
        <head>
                <script src="https://ajax.googleapis.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script>
                <title>Calendar</title>
        </head>
        <body>
        
                <div id="inputs">
                        
                        </br>
                        <h2>Countdown till the end of the summer course:</h2>
                        <div>
                                <h3 id="duration"></h3>
                        </div>
                </div>
                
                <div id="outputs">
                
                </div>
                
                <script>
                const examDate = new Date('8/1/2019');
                
                function updateValues() {
                        var currentTime = new Date();
                        var diffTime = Math.abs(examDate.getTime() - currentTime.getTime());
                        
                        var diffDays = Math.floor(diffTime / (1000 * 60 * 60 * 24)); 
                        diffTime -= diffDays * (1000 * 60 * 60 * 24);
                        
                        var diffHours = Math.floor(diffTime / (1000 * 60 * 60)); 
                        diffTime -= diffHours * (1000 * 60 * 60);
                        
                        var diffMinutes = Math.floor(diffTime / (1000 * 60)); 
                        diffTime -= diffMinutes * (1000 * 60);
                        
                        var diffSeconds = Math.floor(diffTime / (1000)); 
                        
                        var result = diffDays + "d " + diffHours + "h " + diffMinutes + "m " + diffSeconds + "s";
                        $('#duration').html(result);
                        
                }
                
                window.setInterval(updateValues, 1000);
                
                </script>
                
        </body>
</html>


Please upvote, as i have given the exact answer as asked in question. Still in case of any issues in code, let me know in comments. Thanks!

Add a comment
Know the answer?
Add Answer to:
(JQuery) Create countdown timer till the end of the summer course. Let the end of the...
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for? Ask your own homework help question. Our experts will answer your question WITHIN MINUTES for Free.
Similar Homework Help Questions
  • Lab 10: ArrayLists and Files in a GUI Application For this lab, you will work on...

    Lab 10: ArrayLists and Files in a GUI Application For this lab, you will work on a simple GUI application. The starting point for your work consists of four files (TextCollage, DrawTextItem, DrawTextPanel, and SimpleFileChooser) in the code directory. These files are supposed to be in package named "textcollage". Start an Eclipse project, create a package named textcollage in that project, and copy the four files into the package. To run the program, you should run the file TextCollage.java, which...

  • In this stage you should read all of the data into internal structures suitable for use in the later stages and create...

    In this stage you should read all of the data into internal structures suitable for use in the later stages and create an output representation that provides an overview of the data that was read. Photo 1&2 - Question Photo 3 - Input data Photo 4 - Introduction please write a code that will execute such function & generate a required output (as stated on the question). Input data is not required to write a code but if you need...

  • could you please help me with this problem, also I need a little text so I...

    could you please help me with this problem, also I need a little text so I can understand how you solved the problem? import java.io.File; import java.util.Scanner; /** * This program lists the files in a directory specified by * the user. The user is asked to type in a directory name. * If the name entered by the user is not a directory, a * message is printed and the program ends. */ public class DirectoryList { public static...

  • Your goal is to create an ‘Array’ class that is able to hold multiple integer values....

    Your goal is to create an ‘Array’ class that is able to hold multiple integer values. The ‘Array’ class will be given functionality through the use of various overloaded operators You will be given the main() function for your program and must add code in order to achieve the desired result. Do not change any code in main(). If something is not working, you must change your own code, not the code in main(). Assignment 5: overloading member functions. Overview:...

  • You need not run Python programs on a computer in solving the following problems. Place your...

    You need not run Python programs on a computer in solving the following problems. Place your answers into separate "text" files using the names indicated on each problem. Please create your text files using the same text editor that you use for your .py files. Answer submitted in another file format such as .doc, .pages, .rtf, or.pdf will lose least one point per problem! [1] 3 points Use file math.txt What is the precise output from the following code? bar...

  • Help with Data Science python notebook, Question 1 Create a function called vowel_parse() that takes a...

    Help with Data Science python notebook, Question 1 Create a function called vowel_parse() that takes a single string as input. This string is the name of the input directory. It returns a dictionary. This dictionary has keys that are the names of the individual input files. The dictionary values are the number of words in that file that have adjacent vowels ('aa', 'ae', 'oo', 'ia', etc.). Use a regular expression to find these, do not hard code every possible combination...

  • Additional code needed: PartA: BurgerOrder class (1 point) Objective: Create a new class that represents an...

    Additional code needed: PartA: BurgerOrder class (1 point) Objective: Create a new class that represents an order at a fast-food burger joint. This class will be used in Part B, when we work with a list of orders. As vou work through this part and Part B, draw a UML diagram of each class in using the UML drawing tool 1) Create a new Lab5TestProject project in Netbeans, right-click on the lab5testproject package and select New>Java Class 2) Call your...

  • The ACME Manufacturing Company has hired you to help automate their production assembly line. Cameras have...

    The ACME Manufacturing Company has hired you to help automate their production assembly line. Cameras have been placed above a conveyer belt to enables parts on the belt to be photographed and analyzed. You are to augment the system that has been put in place by writing C code to detect the number of parts on the belt, and the positions of each object. The process by which you will do this is called Connected Component Labeling (CCL). These positions...

  • Comprehensive Income Tax Course: Module 1 4. Randy turned 16 last year and had his first...

    Comprehensive Income Tax Course: Module 1 4. Randy turned 16 last year and had his first summer job. Even though his parents are claiming him as a dependent he wants to file a return in order to get his refund. He receives his W-2 and decides he can do his own return using form 1040-EZ. Which of the following information is not found on a Form W-2? a) The taxpayer’s Social Security number b) The taxpayer’s wages, tips and other...

  • Mini Case Building Shared Services at RR Communications4 4 Smith, H. A., and J. D. McKeen....

    Mini Case Building Shared Services at RR Communications4 4 Smith, H. A., and J. D. McKeen. “Shared Services at RR Communications.” #1-L07-1-002, Queen’s School of Business, September 2007. Reproduced by permission of Queen’s University, School of Business, Kingston, Ontario, Canada. Vince Patton had been waiting years for this day. He pulled the papers together in front of him and scanned the small conference room. “You’re fired,” he said to the four divisional CIOs sitting at the table. They looked nervously...

ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT