Sinisterly
Scroll to top - Printable Version

+- Sinisterly (https://sinister.ly)
+-- Forum: General (https://sinister.ly/Forum-General)
+--- Forum: Announcements (https://sinister.ly/Forum-Announcements)
+---- Forum: Suggestions (https://sinister.ly/Forum-Suggestions)
+----- Forum: Old Suggestions (https://sinister.ly/Forum-Old-Suggestions)
+----- Thread: Scroll to top (/Thread-Scroll-to-top--64247)



Scroll to top - Inori - 01-08-2016

Not that scrolling is annoying, but I feel like a little floating footer at the bottom of the window that scrolls you back to the top of the site would be nice and convenient. Using the jQuery, CSS, and HTML below, coupled with the scroll function I detailed here nothing else needs to be changed.

HTML (insert anywhere, doesn't matter):
Code:
<div id="footer"> <a href="#bridge" id="to_top">Scroll to top.</a> </div>

CSS:
Code:
#footer{ position:fixed; bottom:0; min-width:100%; text-align:center; margin-left:-19.6%; padding-bottom:3px; font-family:"Open Sans","Helvetica Neue",Helvetica,Arial,sans-serif; font-size:14px; background-color:rgba(80,80,80,0.75); z-index:200; box-shadow:0px 0px 12px 0px rgba(0,0,0,0.75) } #to_top{ color:#afafaf } #to_top:hover{ text-decoration: none }

jQuery:
Code:
$(document).ready(function(){ $('#footer').fadeOut(0); }); $(document).scroll(function(){ var y=$(this).scrollTop(); if(y>300){ $('#footer').fadeIn(500); }else{ $('#footer').fadeOut(500); } });

I just implemented this on my project page, and I think it'd be a nice addition.


RE: Scroll to top - Megan - 01-08-2016

OR you can just use the button that says "return to Top" on the footer.

https://www.sinister.ly/Thread-Scroll-to-top--64247?pid=554911#top


RE: Scroll to top - Inori - 01-08-2016

(01-08-2016, 01:38 AM)Megan Wrote: OR you can just use the button that says "return to Top" on the footer.

https://www.sinister.ly/Thread-Scroll-to-top--64247?pid=554911#top

If you're in the middle of a page, I feel like this is more accessible and immediately available.


RE: Scroll to top - Satan - 01-08-2016

(01-08-2016, 01:57 AM)Chitoge Wrote: If you're in the middle of a page, I feel like this is more accessible and immediately available.

Or just have @The Real Slim Shady add it to his plugin? Probably doable, but then again, I don't make extensions.


RE: Scroll to top - mothered - 01-08-2016

In my views, I don't think this would be practical.

Given Sinisterly has tab browsing for It's Categories and only 10 posts per page (thus the page length Is somewhat kept to a minimum), there's no effort In returning to the top by simply using the browser's scroll bar. I'm not saying the suggestion Is not a good one- others may find It of benefit. I'm just speaking for myself and how I navigate around the forums effortlessly.