CodeCap
TRENDING
  • Home
  • PHP
  • PYTHON
  • ANDROID
  • JAVA
  • WORDPRESS
  • ARTICLES
  • TUTORIAL
No Result
View All Result
  • Home
  • PHP
  • PYTHON
  • ANDROID
  • JAVA
  • WORDPRESSNew
  • ARTICLES
  • TUTORIAL
SUBSCRIBE
  • Home
  • PHP
  • PYTHON
  • ANDROID
  • JAVA
  • WORDPRESSNew
  • ARTICLES
  • TUTORIAL
No Result
View All Result
CodeCap
No Result
View All Result
Home PHP Programming

How to create scroll to top of the page by jquery animate ?

How to create scroll to top of the page by jquery animate ?

by asdevil666
May 6, 2021
in PHP Programming
0
How to generate UUID in Laravel?
21
SHARES
134
VIEWS
Share on FacebookShare on Twitter





However you want the scrolling process to have animated effect. you have to follow bellow example. in this post you can add button for scrolling top with animate effect. Most of website you can see with one button left side or right side for scrolling top of the page. so, if you want to create on your site then you have to add following jquery code:

Example

<style type="text/css">

#toTopImg{

position: fixed;

bottom: 20px;

left: 20px;

cursor: pointer;

display: none;

z-index: 999999;

background: #5a5a5a none repeat scroll 0 0;

display: block;

padding: 12px 15px;

}

</style>

<script type="text/javascript">

$(document).ready(function(){

$('body').append('<div id="toTopImg" style="display:none">Top</div>');

$(window).scroll(function () {

if ($(this).scrollTop() != 0) {

$('#toTopImg').fadeIn();

} else {

$('#toTopImg').fadeOut();

}

});

$('#toTopImg').click(function(){

$("html, body").animate({ scrollTop: 0 }, 600);

return false;

});

});

</script>

Post Views: 694
Share8Tweet5Share2

Related Posts

How to generate UUID in Laravel?
PHP Programming

How can i print php variable in jquery?

May 6, 2021
How to generate UUID in Laravel?
PHP Programming

How to create database seeder in Laravel 5.7?

May 6, 2021
How to generate UUID in Laravel?
PHP Programming

Laravel Many to Many Polymorphic Relationship Tutorial

May 6, 2021
How to generate UUID in Laravel?
PHP Programming

How to get filename from file path in MySQL?

May 6, 2021
How to generate UUID in Laravel?
PHP Programming

Create Dynamic Treeview Example using JQuery Ajax in PHP MySQL

May 6, 2021
How to generate UUID in Laravel?
PHP Programming

Laravel – Category Treeview Hierarchical Structure Example with Demo

May 6, 2021
Next Post
How to generate UUID in Laravel?

How to get filename from file path in MySQL?

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *

I agree to the Terms & Conditions and Privacy Policy.

Search

No Result
View All Result

Categories

  • Android Programming
  • Android Tutorial
  • Articles
  • Business Traveller
  • Destinations
  • Extreme Work
  • General News
  • Insider Guides
  • JAVA Programming
  • JAVA Tutorial
  • PHP Error Resolve
  • PHP Programming
  • PYTHON Programming
  • PYTHON Tutorial
  • Tutorial
  • Wordpress

Tags

alert alertbox android android error application array auto autocomplete autocomplete off coding confirm box development error features form form alert function function call inspiration in_array java java error java pages javascript mobile app myql mysqli error news off php php error programming python python programming shortcode software standard
Facebook Twitter LinkedIn Youtube RSS

About Us

Codecap is the best programming for the new generation for learning and development

  • 121 King Street, Melbourne
    VIC 3000, Australia
  • codecap666@gmail.com
  • 888-123-4567

Categories

  • Android Programming
  • Android Tutorial
  • Articles
  • Business Traveller
  • Destinations
  • Extreme Work
  • General News
  • Insider Guides
  • JAVA Programming
  • JAVA Tutorial
  • PHP Error Resolve
  • PHP Programming
  • PYTHON Programming
  • PYTHON Tutorial
  • Tutorial
  • Wordpress
VIDEO: Is There Enough Programming Variability For Week 1 of the 2022 CrossFit Semifinals? – Morning Chalk Up
Tutorial

VIDEO: Is There Enough Programming Variability For Week 1 of the 2022 CrossFit Semifinals? – Morning Chalk Up

by asdevil666
May 21, 2022
0

The stage is set for week 1 of Semifinals now that we see the complete picture of programming and the...

Read more
Football: Ohio State announces times, programming updates for three games – OSU – The Lantern

Football: Ohio State announces times, programming updates for three games – OSU – The Lantern

May 21, 2022
Fox, Tubi Unveil Three New Animated Films, 2022-23 Programming Slate – Cartoon Brew

Fox, Tubi Unveil Three New Animated Films, 2022-23 Programming Slate – Cartoon Brew

May 21, 2022
TelevisaUnivision Reveals Upcoming Programming: Sofia Vergara Animated Series, Selena Quintanilla Tribute Concert, More — Upfronts – Deadline

TelevisaUnivision Reveals Upcoming Programming: Sofia Vergara Animated Series, Selena Quintanilla Tribute Concert, More — Upfronts – Deadline

May 21, 2022
Baltimore City Schools Hosts Event For Summer Programming At Maryland Science Center – CBS Baltimore

Baltimore City Schools Hosts Event For Summer Programming At Maryland Science Center – CBS Baltimore

May 21, 2022

Creation by : AMTICY

No Result
View All Result
  • Home
  • PHP
  • PYTHON
  • ANDROID
  • JAVA
  • WORDPRESS
  • ARTICLES
  • TUTORIAL

Creation by : AMTICY

Ads Blocker Image Powered by Code Help Pro
Ads Blocker Detected!!!

We have detected that you are using extensions to block ads. Please support us by disabling these ads blocker.

Refresh