jquery - how to go bottom of a website like back to top using javascript? -


I use coding on HTML, CSS & amp; By using Back to Top ; Javascript combination I now want to include in that can work as a protest against back to top which means go down to return to the top I By including the code:

HTML

  & lt; Div id = "back-top" & gt; & Lt; A href = "#top" & gt; & Lt; Img src = "https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi15a5lg0VVjFNoSSbJEMOXWpmPvV6o5dACZOTFj3KVab8zkIEHFo0fKsEOKMQEIuNMYFhz1lSOAh8tifOH2wN0RkUDNPq-MoD_x5rfRrDfVQFJ2ZSxxjS9wefVzVORphPbPB_vXMj5zGui/s1600/Back-to-top.png" /> & Lt; Br / & gt; Top & LT; / A & gt; & Lt; / Div & gt; # Back-Top {color: text-decoration: none;} #back-top {color:   

# Ff0000; Status: fixed; Bottom: 25px; Left: 125px; font-weight: bold; }

JavaScript

  $ (function () {$ (window) .scroll (function () {if ($ (This) .scrollTop ()> 300) {$ ('#back top') fadein ();} else {$ ('#back top') fadeOut ();}}});   

How can this alternative?

smoothly end up with the body You can use this to scroll to:

  $ (function () {var bodyHeight = $ ('body') height () ; $ ('# Back down one') .on ('click', function () {$ ('html, body') animate. ({ScrollTop: body Height}, 300);});});    

Comments

Popular posts from this blog

c - Mpirun hangs when mpi send and recieve is put in a loop -

python - Apply coupon to a customer's subscription based on non-stripe related actions on the site -

java - Unable to get JDBC connection in Spring application to MySQL -