diff --git a/code/css/popup.css b/code/css/popup.css index ff10b11..8ceed5c 100644 --- a/code/css/popup.css +++ b/code/css/popup.css @@ -20,6 +20,7 @@ article { padding-bottom: 15%; margin: 0 auto; } + footer { clear:both; position: fixed; @@ -32,38 +33,32 @@ footer { background-color: #E5E8E8; } - .favListItem { - text-align: center; - } - - .sortbythis:hover - { - cursor: pointer; - background-color: #ffc10757; - } +.favListItem { + text-align: center; +} - #sortfavby{ - background: none repeat scroll 0 0 #FFFFFF; - border: 1px solid #E5E5E5; - border-radius: 5px 5px 5px 5px; - box-shadow: 0 0 10px #E8E8E8 inset; - height: 40px; - margin: 0 0 0 25px; - padding: 10px; - min-width: 120px; - } +.sortbythis:hover +{ + cursor: pointer; + background-color: #ffc10757; +} - #favSearchInputBox - { - text-align: center; - float:center; - } +#sortfavby{ +background: none repeat scroll 0 0 #FFFFFF; +border: 1px solid #E5E5E5; +border-radius: 5px 5px 5px 5px; +box-shadow: 0 0 10px #E8E8E8 inset; +height: 40px; +margin: 0 0 0 25px; +padding: 10px; +min-width: 120px; +} -/* -li { - padding-left: 40px; +#favSearchInputBox +{ + text-align: center; + float:center; } -*/ .navbar-brand { padding: 0px; @@ -206,9 +201,29 @@ ul.share-buttons .sr-only{ overflow: hidden; } +#scrollBtn { + display: none; + position: fixed; + bottom: 70px; + right: 30px; + z-index: 99; + border: none; + outline: none; + background-color: #818182; + color: white; + cursor: pointer; + padding: 15px; + border-radius: 50px; + width: 45px; +} + +#scrollBtn:hover { + background-color: #555; +} + #share-buttons img { -width: 35px; -padding: 5px; + width: 35px; + padding: 5px; } #share-footer{ diff --git a/code/js/popup.js b/code/js/popup.js index 75ba8e1..b9eb6ee 100644 --- a/code/js/popup.js +++ b/code/js/popup.js @@ -467,13 +467,23 @@ document.addEventListener('DOMContentLoaded', function () }); }); + document.getElementById('scrollBtn').addEventListener('click', function(event){ + document.body.scrollTop = 0; + document.documentElement.scrollTop = 0; + $('#scrollBtn').hide(); + }); + + $(window).bind('mousewheel', function(event) { + if (document.body.scrollTop > 80 || document.documentElement.scrollTop > 80) { + document.getElementById("scrollBtn").style.display = "block"; + } else { + document.getElementById("scrollBtn").style.display = "none"; + }; + }); var a = document.getElementById('fact'); a.src = "image/"+(Math.floor(Math.random() * 10) + 1)+".jpg"; initialize(); addtags(); -}); - - - +}); diff --git a/code/popup.html b/code/popup.html index 7c57a6c..4b4224a 100644 --- a/code/popup.html +++ b/code/popup.html @@ -23,6 +23,7 @@ + OpenGenus: World's first Offline Search Engine @@ -111,6 +112,8 @@

World's first Offline Search Engine

+ +