Skip to content

Commit

Permalink
Wrote some code for an alert pop up 🔧
Browse files Browse the repository at this point in the history
  • Loading branch information
UbaidRussell committed Oct 24, 2023
1 parent a34f92c commit 7792ced
Showing 1 changed file with 20 additions and 1 deletion.
21 changes: 20 additions & 1 deletion main.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,10 @@ let radioChoice;
let userAnswer = document.getElementById('user-answer');


//Part of what we're working on at the bottom of this page 🥊
let submitButton = document.getElementsByClassName('submit-button');


console.log(radioChoices);
hideSecondaryContainer();

Expand All @@ -24,6 +28,7 @@ form.onsubmit = function(e){
changeNumber();
hideMainContainer();
showSecondaryContainer();
chooseAOption()
}

//Change the number in the secondary container
Expand All @@ -47,4 +52,18 @@ function hideSecondaryContainer(){
//Show the secondary container
function showSecondaryContainer(){
secondaryContainer[0].style.display = 'block';
}
}





///This is where we left off RED EMOJI TO MAKE IT STAND OUT 🥊

submitButton.onclick = function(){
if(radioChoices[i].checked === true){
window.alert('Please choose an option');
}
}


0 comments on commit 7792ced

Please sign in to comment.