diff --git a/templates/_base.html b/templates/_base.html
index 36ba8d1..bddd781 100644
--- a/templates/_base.html
+++ b/templates/_base.html
@@ -219,15 +219,15 @@
mywindow.scroll(function () {
newscroll = mywindow.scrollTop();
if (!navbarSupportedContent.hasClass('show')) {
- if (newscroll > (mypos + 30) && !up) {
+ if (newscroll > (mypos + 0) && !up) {
$('.container-header').stop().fadeOut();
up = !up;
- } else if(newscroll < (mypos + 30) && up) {
+ } else if(newscroll < (mypos + 0) && up) {
$('.container-header').stop().fadeIn();
up = !up;
}
}
- // mypos = newscroll;
+ mypos = newscroll;
});
})();
diff --git a/templates/page-place-order.html b/templates/page-place-order.html
index 7ba193c..42a22b7 100644
--- a/templates/page-place-order.html
+++ b/templates/page-place-order.html
@@ -27,7 +27,17 @@
(function () {
function deviceIsMobile() {
// https://coderwall.com/p/i817wa/one-line-function-to-detect-mobile-devices-with-javascript
- return (typeof window.orientation !== 'undefined') || (navigator.userAgent.indexOf('IEMobile') !== -1);
+ return (
+ (typeof window.orientation !== 'undefined') ||
+ navigator.userAgent.match(/Android/i) ||
+ navigator.userAgent.match(/webOS/i) ||
+ navigator.userAgent.match(/iPhone/i) ||
+ navigator.userAgent.match(/iPad/i) ||
+ navigator.userAgent.match(/iPod/i) ||
+ navigator.userAgent.match(/BlackBerry/i) ||
+ navigator.userAgent.match(/Windows Phone/i) ||
+ (navigator.userAgent.indexOf('IEMobile') !== -1)
+ );
};
window.deviceIsMobile = deviceIsMobile;