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();