Loading...
Loading...
Loading...
Loading...

How To Create Scroll Top In JQuery?

View: 553    Dowload: 0   Comment: 0   Post by: hanhga   Category: HTML-CSS template   Fields: Other

Example:

<head>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.12.0/jquery.min.js"></script>
</head>
 
<script>
 $(document).ready(function(){
 $(window).scroll(function(){
 if ($(this).scrollTop() > 100)
 $('.scrollToTop').show();
 else
 $('.scrollToTop').hide();
 });
 $('.scrollToTop').click(function(){
 $('html, body').animate({scrollTop : 0},250);
 return false;
 });
 });
</script>
 
<style>
.scrollToTop {
 position: fixed;
 bottom: 3px;
 right: 25px;
 display:none; 
 cursor:pointer; 
 }
</style>
 
<body>
<h3> Please scroll down to see effect </h3>
 <span style="float:right"> 
 <button type="button" class="scrollToTop">
 Go TO Top 
 </button>
 </span>
 <br><br><br><br><br><br><br><br>
 <br><br><br><br><br><br><br><br>
 <br><br><br><br><br><br><br><br>
 <br><br><br><br><br><br><br><br>
 <br><br><br><br><br><br><br><br>
 <br><br>
</body>
?
 

How To Create Scroll Top In JQuery?

How To Create Scroll Top In JQuery.

Posted on 31-08-2016 

Comment:

To comment you must be logged in members.

Files with category

 
File suggestion for you
File suggestion for you
File suggestion for you
File suggestion for you
Loading...
Loading...
Loading...
Loading...
File top downloads
File top downloads
File top downloads
File top downloads
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Codetitle - library source code to share, download the file to the community
Copyright © 2018. All rights reserved. codetitle Develope by Vinagon .Ltd