diff --git a/css/appstyling-v2.css b/css/appstyling-v2.css
index b1541b6..dd47fd6 100644
--- a/css/appstyling-v2.css
+++ b/css/appstyling-v2.css
@@ -130,6 +130,7 @@ p.subheading {
.b-platevisual__plates{
position: absolute;
+ display: inline-flex;
}
@@ -137,6 +138,7 @@ p.subheading {
top: 50%;
transform: translate(-100%, -50%);
left: 21%;
+ flex-direction: row-reverse;
}
@@ -146,6 +148,12 @@ p.subheading {
left: 79%;
}
+.b-platevisual__plate{
+ position: relative;
+ margin: 0px 1px;
+ vertical-align: middle;
+}
+
.b-calulatorinputs {
height: 40vh;
width: auto;
diff --git a/images/.DS_Store b/images/.DS_Store
new file mode 100644
index 0000000..5008ddf
Binary files /dev/null and b/images/.DS_Store differ
diff --git a/images/2halflbs-Plate.svg b/images/2halflbs-Plate.svg
index c05d065..e371b9a 100644
--- a/images/2halflbs-Plate.svg
+++ b/images/2halflbs-Plate.svg
@@ -1 +1 @@
-
\ No newline at end of file
+
\ No newline at end of file
diff --git a/js/Weight Calculation Script-Edited-Jquery-V4.js b/js/Weight Calculation Script-Edited-Jquery-V4.js
index a72ff1c..f94bea2 100644
--- a/js/Weight Calculation Script-Edited-Jquery-V4.js
+++ b/js/Weight Calculation Script-Edited-Jquery-V4.js
@@ -1,3 +1,4 @@
+// jQuery( document ).ready(function() {
// calculation function starts here
function startcalc() {
@@ -40,8 +41,12 @@
}
+ // var plateloader = jQuery(".b-platevisual__plates").html('');
+ // console.log(plateloader);
+
//plate calulation function
function platecalculator ( plateWeights, platesAvailable, target, finalWeight) {
+ var weighthtml = "";
//iterates though the plates availble.
for (var i = 0; i < platesAvailable.length; i++) {
//checks if the plate is less than or equal to the weight of plates needed
@@ -59,6 +64,7 @@
//Adds plates required
if (weightToAdd > 0) {
jQuery(".input-weightsneeded").eq(i).val(weightToAdd);
+ //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.
}
//sets the offset
@@ -69,31 +75,34 @@
}
}
+ //replaces html for plates required to bar.
+ jQuery(".b-platevisual__plates").html(weighthtml);
}
-//Smooth Scrolling
+ //Smooth Scrolling
-$(document).ready(function(){
- // Add smooth scrolling to all links
- $("a").on('click', function(event) {
+ $(document).ready(function(){
+ // Add smooth scrolling to all links
+ $("a").on('click', function(event) {
- // Make sure this.hash has a value before overriding default behavior
- if (this.hash !== "") {
- // Prevent default anchor click behavior
- event.preventDefault();
+ // Make sure this.hash has a value before overriding default behavior
+ if (this.hash !== "") {
+ // Prevent default anchor click behavior
+ event.preventDefault();
- // Store hash
- var hash = this.hash;
+ // Store hash
+ var hash = this.hash;
- // Using jQuery's animate() method to add smooth page scroll
- // The optional number (800) specifies the number of milliseconds it takes to scroll to the specified area
- $('html, body').animate({
- scrollTop: $(hash).offset().top
- }, 800, function(){
-
- // Add hash (#) to URL when done scrolling (default click behavior)
- window.location.hash = hash;
- });
- } // End if
+ // Using jQuery's animate() method to add smooth page scroll
+ // The optional number (800) specifies the number of milliseconds it takes to scroll to the specified area
+ $('html, body').animate({
+ scrollTop: $(hash).offset().top
+ }, 800, function(){
+
+ // Add hash (#) to URL when done scrolling (default click behavior)
+ window.location.hash = hash;
+ });
+ } // End if
+ });
});
-});
+// });
\ No newline at end of file
diff --git a/whatareyouliftingapp-V5.html b/whatareyouliftingapp-V5.html
index 8013cd7..742944d 100644
--- a/whatareyouliftingapp-V5.html
+++ b/whatareyouliftingapp-V5.html
@@ -41,8 +41,20 @@
Offset: 0 LBS