Forum arrow_forward_ios Codding

Questions By
Monjoti Mondol
card_giftcard ₹0

question_answer Animate scroll to bottom when clicked on a button -javascript or jquery

Hello everyone, 
I want an animate scroll to bottom when clicked on a button with javascript or jquery. When click on a button it slowly goes downward with animation to the bottom of the page of the website. It may be of javascript or jquery, I just only need the code. And friends please try to write the answer with explaining, so I can understand it very easily. 
Thank you in advanced friends for helping me.
03-04-2018, Total 3 Ans Best Answered , 276 views


check_circle_outline BEST ANSWER
Ok friends thank you for reading my questions .. I tried many times and finally I got the solution ... Here is the script guys, hop this one help someone else like me .... Here is the jquery script that will scroll the page down in animated from top to bottom.
First solution is here
<div style="overflow:scroll;height:100px;" id="sc" >
...write all the contents here...
<∕div>
<a id="b" href="#">Click here<∕a>

<script>
$(document).ready(function(){
    $("#b").click(function(){
        //Onclick scroll down
        var y = $(window).scrollTop(); 
        $("#sc").animate({ 
	scrollTop: y + $(window).height() 
        }, 600);
    });
});
<∕script>
If you don't like the first solution then try this .. almost same but little bit different .. because the first one is about div and the second one that is bellow down here is about whole html body.
Second solution is here
<a id="b" href="#">Click Here<∕a>

<script>
$(document).ready(function(){
    $("#b").click(function(){
        //Onclick scroll down
        var y = $(window).scrollTop(); 
        $("html,body").animate({ 
          scrollTop: y + $(window).height() 
        }, 600);
    });
});
<∕script>
And that's it .. hop this will help someone in future. 
 
Monjoti Mondol
03-04-2018

more_horiz Other Answers

Guys if you are looking for jquery solution than here is also it's solution ...


Monjoti Mondol
03-04-2018

Hello guys here in this video also showing the same thing what i had written here. If you don't like to read then you can watch this video https://videos.mritunjoy.com/video-view.php?vid=9&Animate-scroll-to-bottom-when-clicked-on-a-button---jquery---web-development-problem-solving 

Monjoti Mondol
03-04-2018

Please lock LOGIN to Answer

announcement Recently Asked

question_answer


announcement Related Ques

question_answer
question_answer
question_answer
How many countries Twilio can send SMS?
Ans(2) ₹0 check_circle_outline
question_answer
question_answer
question_answer
I want to register SENDER ID for my SNS SMS, on AWS.
Ans(1) ₹0 check_circle_outline
question_answer
question_answer
question_answer
question_answer
question_answer
question_answer
What is SKU in shiprocket? From where I can get it?
Ans(1) ₹0 check_circle_outline
question_answer
PHP SDK - Delete Object not working on s3 - error \
Ans(1) ₹0 check_circle_outline
question_answer
question_answer
question_answer
question_answer
question_answer
How much tables one Mysql database can have?
Ans(1) ₹0 check_circle_outline
question_answer
What is the amount of withdrawn in RazorPay?
Ans(1) ₹0 check_circle_outline
question_answer
question_answer
question_answer
Need codes to send SMS using AWS SNS in PHP.
Ans(1) ₹0 check_circle_outline
question_answer
question_answer
Multiple database vs single database on mysql?
Ans(1) ₹0 check_circle_outline
question_answer
question_answer
Is this PMEGP Loan works Offline also?
Ans(1) ₹0 check_circle_outline
question_answer
question_answer
Can I create live straming videos using cloudfront?
Ans(1) ₹0 check_circle_outline
question_answer
question_answer
question_answer
question_answer
question_answer
question_answer
question_answer
question_answer
What is La Liga?
Ans(1) ₹0 check_circle_outline
question_answer
question_answer
question_answer
question_answer
question_answer
html css center horizontal list, menu system
Ans(2) ₹0 check_circle_outline
question_answer
php count variable values separated with comma
Ans(2) ₹0 check_circle_outline
question_answer
question_answer
question_answer
question_answer
question_answer
question_answer
How to properly get Pre Signed URL from s3 Bucket?
Ans(1) ₹0 check_circle_outline
question_answer
question_answer
How to get date of every after 30 days using PHP?
Ans(1) ₹0 check_circle_outline
question_answer
question_answer
question_answer
question_answer
How much is the Margin Money of PMEGP Loan fo ST?
Ans(1) ₹0 check_circle_outline
question_answer
question_answer
question_answer
Which is the right time to get EDP Training?
Ans(1) ₹0 check_circle_outline
question_answer
What were the documents required for PMEGP Loan?
Ans(1) ₹0 check_circle_outline
question_answer
question_answer
multiple aws s3 bucket vs one aws s3 bucket?
Ans(1) ₹0 check_circle_outline
question_answer
question_answer
question_answer
Linux repeated Keyword problems.. how to solve it?
Ans(1) ₹0 check_circle_outline
question_answer
question_answer
question_answer
question_answer
question_answer
question_answer
How to get the present full url using PHP
Ans(2) ₹0 check_circle_outline
question_answer
question_answer
question_answer
PHP code to get the token of Shiprocket.
Ans(1) ₹0 check_circle_outline
question_answer
How to get the nested Array Data using PHP?
Ans(1) ₹0 check_circle_outline
question_answer

WelCome to the World of Digital Expression

Transform your Works into Digital and Makes your life more easier.

121

Total users

121

Active users

5

Active Earners

location_on BTR,Assam,INDIA
(Bodoland)
email [email protected]
call +91 8486866741
rss_feed

Copyright ©2019-20 mritunjoy.com,All Rights Reserved