From 8425f6e59ecc859a79dc342ddc25388c8295383e Mon Sep 17 00:00:00 2001 From: stevenhaskell Date: Mon, 5 Nov 2018 15:43:09 -0500 Subject: [PATCH] Updates to: Calculation Script, Reset Script, App Copy, App Styling Finalized the calculation script and reset script. Now it will calculate any weight with no issues. Updated the copy to make it easier to understand how the app works and how to access certain things. Updated options button to make it stand out and appear clickable. --- css/appstyling-v2.css | 3 ++- index.html | 2 +- js/Weight Calculation Script-Edited-Jquery-V4.js | 4 +++- 3 files changed, 6 insertions(+), 3 deletions(-) diff --git a/css/appstyling-v2.css b/css/appstyling-v2.css index 03e41da..1208c13 100644 --- a/css/appstyling-v2.css +++ b/css/appstyling-v2.css @@ -65,7 +65,7 @@ a { } .b-header__container { - width: 80%; + width: 85%; margin: 0; position: absolute; top: 50%; @@ -392,6 +392,7 @@ input.input-calculate:focus{ .b-infoentry__heading{ background: #48484A; + color: #CCFF00; white-space: nowrap; padding: 0 32px; position: absolute; diff --git a/index.html b/index.html index 3ea9db7..b6833e3 100644 --- a/index.html +++ b/index.html @@ -34,7 +34,7 @@

What are you lifting?

-

Type in your weight below and it will calculate the plates needed.

+

Enter your weight at the bottom and calculate your plates. Change your bar weight and plates in options.

diff --git a/js/Weight Calculation Script-Edited-Jquery-V4.js b/js/Weight Calculation Script-Edited-Jquery-V4.js index c7bb394..e27a252 100644 --- a/js/Weight Calculation Script-Edited-Jquery-V4.js +++ b/js/Weight Calculation Script-Edited-Jquery-V4.js @@ -124,7 +124,7 @@ // Script for weights under 5lbs heavier then the bar. Still needs tweaking. var bar = jQuery(".input-bar").val(); var bartest = parseInt(bar)+4; - if (jQuery(".input-weight").val() <= bartest) { + if (jQuery(".input-weight").val() <= bartest && jQuery(".input-weight").val() != "") { jQuery(".input-final").html(bar); var offset = Math.abs(jQuery(".input-weight").val() - bar); if (jQuery(".input-weight").val() !== bar) { @@ -187,6 +187,8 @@ jQuery(".b-infoentry__reset").click(function(){ //sets current bar weight var bar = jQuery(".input-bar").val(); + //resets offset + jQuery(".input-difference").text("0") //resets input for weight and required plate numbers jQuery(".input-weight, .input-weightsneeded").val(''); //Updates the weight display to the bar weight