Minimal Stopwatch & Countdown App In jQuery - js-timer

File Size: 4.9 KB
Views Total: 11037
Last Update:
Publish Date:
Official Website: Go to website
License: MIT
   
Minimal Stopwatch & Countdown App In jQuery - js-timer

js-timer is a lightweight, nice-looking timer script that makes it simple to generate a stopwatch & countdown web app just in a minute.

Your users will get notified when the countdown is completely finished. And the digital color of the countdown timer will automatically change as the remaining time decreases.

How to use it:

1. Load the necessary JavaScript and CSS files in the document.

<link rel="stylesheet" href="./css/style.css">
<script src="jquery.min.js"></script>
<script src="./js/script.js"></script>

2. Create the HTML for the Stopwatch & Countdown app.

<div class="input">
  <input type="number" id="num" min="0">
  <select id="measure">
      <option value="0">Select Unit</option>
      <option value="s">Seconds</option>
      <option value="m">Minutes</option>
      <option value="h">Hours</option>
  </select>
</div>

<div class="buttons-wrapper">
  <button id="start-cronometer">Start Stopwatch</button>
  <button id="start-countdown">Start Countdown</button>
</div>

<div class="clock-wrapper">
  <span class="hours">00</span>
  <span class="dots">:</span>
  <span class="minutes">00</span>
  <span class="dots">:</span>
  <span class="seconds">00</span>
</div>

<div class="buttons-wrapper">
  <button id="resume-timer">Resume Timer</button>
  <button id="stop-timer">Stop Timer</button>
  <button id="reset-timer">Reset Timer</button>
</div>

This awesome jQuery plugin is developed by gfoliver. For more Advanced Usages, please check the demo page or visit the official website.