Get div to show/hide when scrolling for a “back to top” link
I can't make my "go to top" id=arrow-up div to disappear when on e.g. top of the page. At the top of the page I got So I would like the arrow-up div to visible(show("slow")) when not on top of the page. var tmp = $(window).height(); Tmp is used to get the viewport height... Not sure if that is right? I have seen other solutions but they are only kind of the same... and I can't make them work, also they font use :in-viewport . Can I make it with viewport or am I side tracked? <script type="text/javascript" src="http://code.jquery.com/jquery-latest.min.js"> </script> <script src="bootstrap-3.1.1