Article

Use listeners to make a stopwatch.

https://cdn.jsdelivr.net/npm/[email protected]/dist/js.cookie.min.js
Copy to clipboard

We can thus slightly modify the code above to come up with a stop watch. https://raw.githubusercontent.com/finsweet/jqueryCourse/main/jquery%20events/ex22.js?actionable=true

<script>
$(document).ready(function(){
  XT1
});
</script>
Copy to clipboard
Send to Live Demo

Live demo

<div id="minidivpage" class="example-live"><div class="w-row"><div class="w-clearfix w-col w-col-1"><h1 id="counter-value" class="heading-6">0</h1></div><div class="w-col w-col-2"><a id="counter" href="#" class="button-2 w-button">Hide</a></div><div class="column-2 w-col w-col-9"><div id="hidden-text" class="box">Password Hidden text</div></div></div></div>

<script>    
$(document).ready(function() {
  XT1
});
</script>
<script>
  
</script>
Copy to clipboard
Press the Run Demo button to execute the scripts above.
Thank you! Your submission has been received!
Oops! Something went wrong while submitting the form.

Your browser is too small

Resize your browser to be at least 769px wide.