JSFiddle - React, Tailwind, and code Playground

by Siva Charan

HTML

<div id="play">Play</div>
<div id="bar"></div>
<div id="indicator"></div>

CSS

#play {
	position:absolute;
	left:45px; top:20px;
	cursor: pointer;
}

#bar{
	position:absolute;
	width:150px; height:4px;
	background-color:#999;
}

#indicator{
	position:absolute;
	width:0px; height:4px;
	background-color:#333;
    border: 1px solid red;
}

JavaScript

$(function(){
    
  $("#play").click(function() {
	$("#indicator").animate({"width": "150px"}, 8400);
  });
    
    $("#indicator").click(function() {
        alert($(this).width());
    });
    
});