Update js/Weight Calculation Script-Edited-Jquery-V4.js
Previous script overwrote final weight.
This commit is contained in:
@@ -153,8 +153,9 @@
|
|||||||
jQuery(".input-calculate").click(function(){
|
jQuery(".input-calculate").click(function(){
|
||||||
//sets bar weight to current inputed bar weight
|
//sets bar weight to current inputed bar weight
|
||||||
var bar = jQuery(".input-bar").val();
|
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.
|
//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() <= bar) {
|
if (jQuery(".input-weight").val() == "") {
|
||||||
|
console.log("fired");
|
||||||
jQuery(".input-weight").val(bar);
|
jQuery(".input-weight").val(bar);
|
||||||
jQuery(".input-final").html(bar);
|
jQuery(".input-final").html(bar);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user