From 9e2b1751bda5e36182ca731165c726e9793c1a13 Mon Sep 17 00:00:00 2001 From: Theodore Nguyen <109197491+theodoretnguyen@users.noreply.github.com> Date: Tue, 7 Feb 2023 18:49:53 -0800 Subject: [PATCH] Add comments --- app.css | 3 +++ app.js | 19 +++++-------------- index.html | 9 ++++----- 3 files changed, 12 insertions(+), 19 deletions(-) diff --git a/app.css b/app.css index 5adef1e..c5a8d98 100644 --- a/app.css +++ b/app.css @@ -23,6 +23,7 @@ td { text-align: center; } +/* images */ img { max-width: 40%; height: auto; @@ -62,6 +63,7 @@ p { font-size: 14pt; } +/* buttons */ input { padding: 16px 32px; text-decoration: none; @@ -120,6 +122,7 @@ input { color: black; } +/* counter */ .counter { font-size: 40pt; } diff --git a/app.js b/app.js index 81cad96..d946b6a 100644 --- a/app.js +++ b/app.js @@ -1,6 +1,8 @@ +// price of tokens const red_token_price = 2; const blue_token_price = 3; +// Big Hero 6 button let tix_bg6 = 0; document.getElementById('button_bg6').addEventListener('click', function() { @@ -8,13 +10,7 @@ document.getElementById('button_bg6').addEventListener('click', } ); -/* document.getElementById('button_bg6').addEventListener('click', - function() { - let rev_bg6 = tix_bg6 * 3 * red_token_price + tix_bg6 * 2 * blue_token_price; - document.getElementById('rev_bg6').innerHTML = `${rev_bg6}`; - } -); */ - +// Inside Out button let tix_io = 0; document.getElementById('button_io').addEventListener('click', function() { @@ -22,13 +18,7 @@ document.getElementById('button_io').addEventListener('click', } ); -/* document.getElementById('button_io').addEventListener('click', - function() { - let rev_io = tix_io * 2 * red_token_price + tix_io * 3 * blue_token_price; - document.getElementById('rev_io').innerHTML = `${rev_io}`; - } -); */ - +// show revenues button document.getElementById('button_rev').addEventListener('click', function() { let rev_bg6 = tix_bg6 * 3 * red_token_price + tix_bg6 * 2 * blue_token_price; @@ -39,6 +29,7 @@ document.getElementById('button_rev').addEventListener('click', } ); +// reset button document.getElementById('button_reset').addEventListener('click', function() { tix_bg6 = 0; diff --git a/index.html b/index.html index b0eb340..32363ba 100644 --- a/index.html +++ b/index.html @@ -101,11 +101,10 @@

Movie Theater Equations

- + -