From 6d796eda4369949b6cc8f82a41f96e45395b2920 Mon Sep 17 00:00:00 2001 From: Matt Huntington Date: Fri, 8 Sep 2017 14:26:54 -0400 Subject: [PATCH] remove I'm done button when clicked --- public/index.html | 2 +- public/js/index.js | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/public/index.html b/public/index.html index 30e169d..363f6b8 100644 --- a/public/index.html +++ b/public/index.html @@ -16,7 +16,7 @@
Current Prompt
- + diff --git a/public/js/index.js b/public/js/index.js index bcdbd19..33ad4fa 100644 --- a/public/js/index.js +++ b/public/js/index.js @@ -13,6 +13,7 @@ socket.on('prompt sent', function (prompt) { if(prompt !== document.querySelector('dd').innerHTML){ if(prompt !== "Nothing Yet"){ button.removeAttribute("disabled"); + button.classList.remove("invisible"); } document.querySelector('dd').innerHTML = prompt; } @@ -26,6 +27,7 @@ socket.on('disconnect students', function (prompt) { button.addEventListener('click', (event)=>{ button.setAttribute("disabled",true); + button.classList.add("invisible"); socket.emit('prompt completed', username); });