Advertisement
Guest User

Untitled

a guest
Jun 17th, 2019
73
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.59 KB | None | 0 0
  1. <a href="#topOfPage" onclick="scrollLeftFunction()">
  2.  
  3. function rightArrowPressed() {
  4. $("html, body").stop().animate({
  5. scrollTop: 0 ,
  6. scrollLeft: windowWidth*(Math.round((jq("#topnav").offset().left +
  7. windowWidth)/windowWidth))
  8. }, 1000,'easeOutExpo');
  9. };
  10.  
  11. function upArrowPressed() {
  12. var body = document.body; // For Safari
  13. var html = document.documentElement; // Chrome, Firefox, IE and Opera places the overflow at the html level, unless else is specified.
  14. body.scrollTop -= 200;
  15. html.scrollTop -= 200;
  16. };
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement