Skip to content

Commit

Permalink
change seat number colour
Browse files Browse the repository at this point in the history
  • Loading branch information
kole1337 committed Mar 27, 2024
1 parent ca32697 commit bd7f343
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
1 change: 0 additions & 1 deletion govcalc.html
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,6 @@ <h1>Правителствен калкулатор</h1>
<button class="ITN" onclick="setGovName(this)">ИТН: 11</button>

<h2 id="gov">Правителство: </h2>
<h2 id ="seats">Мандати: ---/121</h2>
<div class="mandati">
<h2>Мандати:</h2></li>
<h2 id="numSeats">0</h2>
Expand Down
8 changes: 7 additions & 1 deletion govcalc.js
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,13 @@ function setGovName(getButtonClass){
removeSeats( parseInt(buttonArr[1] , 10) );
}


var seats = parseInt(document.getElementById("numSeats").innerText, 10);
if(seats <121){
document.getElementById("numSeats").style.color = "red";
}else{
document.getElementById("numSeats").style.color = "green";

}
}


Expand Down

0 comments on commit bd7f343

Please sign in to comment.