Scroll to the top of page using jQuery JavaScript
home
Run
screen_rotation
fullscreen
cloud_download
navigate_next
<!DOCTYPE html> <html> <head> <title>jQuery Scrolltop Demo example</title> <script type="text/javascript"> function scrollToTop(){ window.location = '#'; } </script> </head> <body> <p>Demo Text Demo Text ....</p> <p>Demo Text Demo Text ....</p> <p>Demo Text Demo Text ....</p> <p>Demo Text Demo Text ....</p> <p>Demo Text Demo Text ....</p> <p>Demo Text Demo Text ....</p> <p>Demo Text Demo Text ....</p> <p>Demo Text Demo Text ....</p> <p>Demo Text Demo Text ....</p> <p>Demo Text Demo Text ....</p> <p>Demo Text Demo Text ....</p> <p>Demo Text Demo Text ....</p> <p>Demo Text Demo Text ....</p> <p>Demo Text Demo Text ....</p> <p>Demo Text Demo Text ....</p> <p>Demo Text Demo Text ....</p> <p>Demo Text Demo Text ....</p> <p>Demo Text Demo Text ....</p> <p>Demo Text Demo Text ....</p> <p>Demo Text Demo Text ....</p> <h4 ><a href="javascript:void(0);" onclick="scrollToTop()" >Click to scroll top </a></h4> <div></div> </body> </html>
<!DOCTYPE html> <html> <head> <title>jQuery Scrolltop Demo example</title> <script type="text/javascript"> function scrollToTop(){ window.location = '#'; } </script> </head> <body> <p>Demo Text Demo Text ....</p> <p>Demo Text Demo Text ....</p> <p>Demo Text Demo Text ....</p> <p>Demo Text Demo Text ....</p> <p>Demo Text Demo Text ....</p> <p>Demo Text Demo Text ....</p> <p>Demo Text Demo Text ....</p> <p>Demo Text Demo Text ....</p> <p>Demo Text Demo Text ....</p> <p>Demo Text Demo Text ....</p> <p>Demo Text Demo Text ....</p> <p>Demo Text Demo Text ....</p> <p>Demo Text Demo Text ....</p> <p>Demo Text Demo Text ....</p> <p>Demo Text Demo Text ....</p> <p>Demo Text Demo Text ....</p> <p>Demo Text Demo Text ....</p> <p>Demo Text Demo Text ....</p> <p>Demo Text Demo Text ....</p> <p>Demo Text Demo Text ....</p> <h4 ><a href="javascript:void(0);" onclick="scrollToTop()" >Click to scroll top </a></h4> <div></div> </body> </html>
Copyrights@tutorialsplane.com