JSFiddle - React, Tailwind, and code Playground

by smingers

HTML

<div id="timer">
    <button class="start">start</button>
    <button class="pause">pause</button>
    <button class="stop">stop</button>
</div>

CSS

#timer .start {}

JavaScript

// declare some variables, save some time
var $timer = $('#timer');
var $start = $timer.find('.start');
console.log($start);

$start.on('click', function() {
    var timer = setTimeout(function() {
        console.log('hello');
    }, 1000);
});