From 9032402dc92bea94ca541a9d3ad037d759c99095 Mon Sep 17 00:00:00 2001 From: stevenhaskell Date: Mon, 29 Oct 2018 15:21:36 -0400 Subject: [PATCH] Update To Calculation scripts Updated script to show the bar weight if user hits LIFT without entering a weight. Still need to resolve if you enter a weight less than 5lbs heavier than the bar. --- js/Weight Calculation Script-Edited-Jquery-V4.js | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/js/Weight Calculation Script-Edited-Jquery-V4.js b/js/Weight Calculation Script-Edited-Jquery-V4.js index 3ec04b9..48ba0ff 100644 --- a/js/Weight Calculation Script-Edited-Jquery-V4.js +++ b/js/Weight Calculation Script-Edited-Jquery-V4.js @@ -151,6 +151,13 @@ //show reset button on calculate 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) { + jQuery(".input-weight").val(bar); + jQuery(".input-final").html(bar); + } jQuery(".b-infoentry__reset, .b-platevisual__weightfinal").show(); if (jQuery(".b-platevisual__weightdifference").text() != "Offset: 0 LBS") { jQuery(".b-platevisual__weightdifference").show();