I have created a circle using div. But I am struggling to convert the circle border into clickable function.
My major focus of implementation is React. But if I get the logic in basic JS as well then I will convert it to react.This is the reason I am tagging react as well.
What I am trying to achieve is : there are 4 section of circle border.On left top border and left bottom border similarly right top border and right bottom border.I want it to convert into clickable 4 different function. Preview below
function redClick(){
}
function blueClick(){
}
function greenClick(){
}
function orangeClick(){
}
.circle
{
border-radius:30px;
width:35px;
height:35px;
border:4px red solid;
border-top:4px solid red;
border-right:4px solid green;
border-bottom:4px solid blue;
border-left:4px solid orange;
transform:rotate(45deg);
}
<html>
<body>
<div class="circle">
</div>
<body>
</html>
On red click it should call red function and similarly for all