Skip to content

Commit

Permalink
mouse events
Browse files Browse the repository at this point in the history
  • Loading branch information
muktar1907 committed Apr 25, 2024
1 parent 9360d38 commit aa9d2a2
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion html/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -267,6 +267,9 @@ <h2>Timer: <span id="timer">30</span> seconds</h2>
{
cells[i].addEventListener("onmousedown",function()
{
this.addEventListener("mouseover",function(){
this.style.backgroundColor="blue";
});
buttonEvent(this.getAttribute("id"),0);
});
cells[i].addEventListener("mouseover",function()
Expand All @@ -287,7 +290,7 @@ <h2>Timer: <span id="timer">30</span> seconds</h2>
function buttonEvent(cell,action)
{
let button= document.getElementById(cell);
button.style.backgroundColor="blue";
//button.style.backgroundColor="blue";
U = new UserEvent();
U.cell=parseInt(cell);
U.action=action;
Expand Down

0 comments on commit aa9d2a2

Please sign in to comment.