From 179e15b77aa6e20ba3166e0033b302489251576c Mon Sep 17 00:00:00 2001 From: stevenhaskell Date: Fri, 12 Oct 2018 13:10:47 -0400 Subject: [PATCH] Updated Horizonal Layout & Added Smooth Scrolling Set Min heights for blocks so when orientation is landscape it doesnt break. Also added jQuery smooth scrolling so help with interactions. --- css/appstyling-v2.css | 16 +++++++++++ ...ght Calculation Script-Edited-Jquery-V4.js | 27 +++++++++++++++++++ whatareyouliftingapp-V5.html | 4 +-- 3 files changed, 45 insertions(+), 2 deletions(-) diff --git a/css/appstyling-v2.css b/css/appstyling-v2.css index e96b7f3..db5c383 100644 --- a/css/appstyling-v2.css +++ b/css/appstyling-v2.css @@ -371,6 +371,22 @@ input.input-weightsavailable{ color: #48484A; } +@media screen and (orientation: landscape) { + .b-header{ + min-height: 136px; + } + .b-platevisual{ + min-height: 204px; + } + .b-calulatorinputs{ + min-height: 245px; + } + +} + + + + /* .b-container { diff --git a/js/Weight Calculation Script-Edited-Jquery-V4.js b/js/Weight Calculation Script-Edited-Jquery-V4.js index 3ca6b17..a72ff1c 100644 --- a/js/Weight Calculation Script-Edited-Jquery-V4.js +++ b/js/Weight Calculation Script-Edited-Jquery-V4.js @@ -70,3 +70,30 @@ } } } + +//Smooth Scrolling + +$(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(); + + // 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 + }); +}); diff --git a/whatareyouliftingapp-V5.html b/whatareyouliftingapp-V5.html index 7bd797b..c024ed3 100644 --- a/whatareyouliftingapp-V5.html +++ b/whatareyouliftingapp-V5.html @@ -26,7 +26,7 @@ -
+