Saves value of plates to add
Adds html of weight to add to string.
This commit is contained in:
@@ -64,7 +64,16 @@
|
|||||||
//Adds plates required
|
//Adds plates required
|
||||||
if (weightToAdd > 0) {
|
if (weightToAdd > 0) {
|
||||||
jQuery(".input-weightsneeded").eq(i).val(weightToAdd);
|
jQuery(".input-weightsneeded").eq(i).val(weightToAdd);
|
||||||
|
|
||||||
|
//itterates through plates being added and saves html to string
|
||||||
|
for(var x = 0; x < weightToAdd; x++){
|
||||||
//instead of putting in a string and updating all at once. append the weights each time. Make function and append and then animate. Replace this block.
|
//instead of putting in a string and updating all at once. append the weights each time. Make function and append and then animate. Replace this block.
|
||||||
|
var platename = plateWeights[i];
|
||||||
|
if (platename == 2.5) {
|
||||||
|
platename = '2half';
|
||||||
|
}
|
||||||
|
weighthtml += '<img src="images/'+ platename +'lbs-Plate.svg" class="b-platevisual__plate b-platevisual__plate--' + platename + '">';
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
//sets the offset
|
//sets the offset
|
||||||
|
|||||||
Reference in New Issue
Block a user