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: # Ff0000; Status: fixed; Bottom: 25px; Left: 125px; font-weight: bold; } JavaScript How can this alternative? smoothly end up with the body You can use this to scroll to:
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:
$ (function () {$ (window) .scroll (function () {if ($ (This) .scrollTop ()> 300) {$ ('#back top') fadein ();} else {$ ('#back top') fadeOut ();}}});
$ (function () {var bodyHeight = $ ('body') height () ; $ ('# Back down one') .on ('click', function () {$ ('html, body') animate. ({ScrollTop: body Height}, 300);});});
Comments
Post a Comment