From 415264a84f7aee6843be6e1e89e5a7adb17e562a Mon Sep 17 00:00:00 2001 From: Steven Haskell Date: Wed, 17 Oct 2018 22:47:15 -0400 Subject: [PATCH] Numeric inputs and scroll restore Added styling for inputs for numeric only keyboard. Added javascript that restores the focus after leaving input focus. --- index.html | 16 ++++++++-------- js/Weight Calculation Script-Edited-Jquery-V4.js | 15 +++++++++++++++ 2 files changed, 23 insertions(+), 8 deletions(-) diff --git a/index.html b/index.html index 742944d..abb258e 100644 --- a/index.html +++ b/index.html @@ -98,7 +98,7 @@
- +
@@ -117,7 +117,7 @@
- +
@@ -151,27 +151,27 @@
- +
- +
- +
- +
- +
- +
diff --git a/js/Weight Calculation Script-Edited-Jquery-V4.js b/js/Weight Calculation Script-Edited-Jquery-V4.js index ed41597..f6cb4e9 100644 --- a/js/Weight Calculation Script-Edited-Jquery-V4.js +++ b/js/Weight Calculation Script-Edited-Jquery-V4.js @@ -114,4 +114,19 @@ } // End if }); }); + + //Saves scroll position on focus and restores + var savedScrollTop + function saveScroll() { + var savedScrollTop = jQuery(document).scrollTop(); // save scroll position + } + function restoreScroll() { + jQuery(document).scrollTop(savedScrollTop); // restore it + } + + + + /*var savedScrollTop = $(document).scrollTop(); // save scroll position + + $(document).scrollTop(savedScrollTop ); // restore it*/ // }); \ No newline at end of file