From 74285d5fb2f7d9bcd17250e5c6f13bf7d32d3172 Mon Sep 17 00:00:00 2001 From: stevenhaskell Date: Mon, 29 Oct 2018 18:21:45 -0400 Subject: [PATCH] Update js/Weight Calculation Script-Edited-Jquery-V4.js Previous script overwrote final weight. --- js/Weight Calculation Script-Edited-Jquery-V4.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/js/Weight Calculation Script-Edited-Jquery-V4.js b/js/Weight Calculation Script-Edited-Jquery-V4.js index 48ba0ff..a452876 100644 --- a/js/Weight Calculation Script-Edited-Jquery-V4.js +++ b/js/Weight Calculation Script-Edited-Jquery-V4.js @@ -153,8 +153,9 @@ jQuery(".input-calculate").click(function(){ //sets bar weight to current inputed bar weight var bar = jQuery(".input-bar").val(); - //checks if the weight input is less than or equal to the bar weight. If it is, update the weigh input and final weight display. - if (jQuery(".input-weight").val() <= bar) { + //checks if the weight input empty. If it is, update the weigh input as the bar weight and final weight display. + if (jQuery(".input-weight").val() == "") { + console.log("fired"); jQuery(".input-weight").val(bar); jQuery(".input-final").html(bar); }