summaryrefslogtreecommitdiff
path: root/views/layout.haml
diff options
context:
space:
mode:
authorgebele <gebele@in-silico.ch>2013-04-09 16:50:56 +0200
committergebele <gebele@in-silico.ch>2013-04-09 16:50:56 +0200
commitc74da4b41e6413d126ae8d6aa62874627cb14fca (patch)
tree96e8d75a655704d0a63ab3a51c46ab173c4d37dd /views/layout.haml
parentb983a694fca22d53054a90ddb894f33be365e5a8 (diff)
adjusted for services update
Diffstat (limited to 'views/layout.haml')
-rw-r--r--views/layout.haml27
1 files changed, 26 insertions, 1 deletions
diff --git a/views/layout.haml b/views/layout.haml
index 7c05190..b6606a1 100644
--- a/views/layout.haml
+++ b/views/layout.haml
@@ -20,7 +20,32 @@
%h1 Lazar Toxicity Predictions
%hr
- .content
+ .content
+ :javascript
+ $(document).ready(function(){
+ // hide #back-top first
+ $("#back-top").hide();
+ // fade in #back-top
+ $(function () {
+ $(window).scroll(function () {
+ if ($(this).scrollTop() > 400) {
+ $('#back-top').fadeIn();
+ } else {
+ $('#back-top').fadeOut();
+ }
+ });
+ // scroll body to 0px on click
+ $('#back-top a').click(function () {
+ $('body,html').animate({
+ scrollTop: 0
+ }, 500);
+ return false;
+ });
+ });
+ });
+ #back-top
+ %a{:href => ""}^ top ^
+
= yield
.footer