This code runs when i click on a piece of text. The first if works, but the second doesn't want to execute.
if (music = true) {
music = false;
$('#musicButton').html("Music: Off")
}
if (music = false) {
music = true;
$('#musicButton').html("Music: On")
}
I tried else if and else, but none seem to work.
Aucun commentaire:
Enregistrer un commentaire