I am trying to replicate something like a volume slider or video seekbar where, when the user clicks a point, the indicator jumps to that location.
To do that, I am trying to get the position of a click event on a div
. When user clicks somewhere on my div I am trying to return x
, y
coords.
So far I just have a div
and a basic listener:
<div class="heybro" style="width:100px;height:100px;background:black;"></div>
$('.heybro').click(function(){
alert("something");
});