Add "Back To Top" Button In Blogger Blog With Smooth Scrolling

back-to-top-button-for-blogger


In today’s tutorial we’ll show you how to add "back to the top" button in blogger blog with smooth scrolling in a easy steps. The button we’re going to create will see in the bottom-right of the page and it appears only when users scroll down the page allowing them to scroll to the top of the page.

If your blog have a lot of information or you write very long posts then you must have to add this widget in your blogger blog to make better user experience.


 Note:  In the process a mistakes might be made, so please backup your template before making any changes.

Lets start the tutorial.

Step 1. In this button we are going to use font awesome so we need to add it in template.

 Note:  If there is already a font awesome library in your template, ignore below code and go for the further steps.

[<link href='//netdna.bootstrapcdn.com/font-awesome/4.0.3/css/font-awesome.css' rel='stylesheet'/>]

Step 2. To add Back to Top button in blogger just navigate to Blogger Dashboard >> Template >> Edit HTML and Search for the code ]]></ b: skin>.

Now copy the below CSS code and paste it exact before   ]]></b:skin>  section.

 [#return-to-top {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background: rgb(0, 0, 0);
    background: rgba(0, 0, 0, 0.7);
    width: 50px;
    height: 50px;
    display: block;
    text-decoration: none;
    -webkit-border-radius: 35px;
    -moz-border-radius: 35px;
    border-radius: 35px;
    display: none;

}
#return-to-top i {
    color: #fff;
    margin: 0;
    position: relative;
    left: 16px;
    top: 10px;
    font-size: 19px;
    -webkit-transition: all 0.3s ease;
    -moz-transition: all 0.3s ease;
    -ms-transition: all 0.3s ease;
    -o-transition: all 0.3s ease;
    transition: all 0.3s ease;
}
#return-to-top:hover {
    background: rgba(0, 0, 0, 0.9);
}
#return-to-top:hover i {
    color: #fff;
}]

Step 3. Now, find a </body> tag in your templates and paste below piece of code before </body> tag.

[</script>
<a href='javascript:' id='return-to-top'><i class='fa fa-chevron-up'/></a>
<script type='text/javascript'>
// ===== Back to Top ====
$(window).scroll(function() {
    if ($(this).scrollTop() &gt;= 50) {       
        $(&#39;#return-to-top&#39;).fadeIn(200); 
    } else {
        $(&#39;#return-to-top&#39;).fadeOut(200);  
    }
});
$(&#39;#return-to-top&#39;).click(function() {    
    $(&#39;body,html&#39;).animate({
        scrollTop : 0                     
    }, 500);
});
</script>]

Step 4. Finally, Save your template and see the result.

Bottom Line


So, this was the easy tutorial on how to add back to top button in Blogger. usually you can customize this code easily but if you are newbie then use the default code.

I hope that you found it helpful and I’m sure it will benefit for your readers.

If you still facing any problem while installing this widget then just drop your query in below comment box. I would love to hear from you and help you out. Happy Blogging!

COMMENTS



Name

404 Alexa Alexa Ranking Backlink Blockquote Blogger Blogger Templates Blogger Tricks Blogger Tutorials Blogger Widgets Blogging Mistakes Blogging Tips CSS Download How To Image Optimization Infographics Internet Make Money Online Plagiarism Plagiarism Checker Privacy Policy redirection SEO SEO Tips Social Media Tools Traffic Tips WordPress YouTube
false
ltr
item
Shoutersclub : Add "Back To Top" Button In Blogger Blog With Smooth Scrolling
Add "Back To Top" Button In Blogger Blog With Smooth Scrolling
In today’s tutorial we’ll show you how to add "back to the top" button in blogger blog with smooth scrolling in a easy steps.
https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiQO2mtC7PnMnRIua4bTDEdrnynV7G0wIe-GZZ9KtZCFDvQcXMDBlX8Wsyp8JamZmUcXjRH9srzQVJ7cIyLizkthI2QSyVrBmSMuFe7T_6SLNHr8fq07dFcYHQhlYcXrX0iD4UMYB7zAj2l/s1600/Back-to-top.jpg
https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiQO2mtC7PnMnRIua4bTDEdrnynV7G0wIe-GZZ9KtZCFDvQcXMDBlX8Wsyp8JamZmUcXjRH9srzQVJ7cIyLizkthI2QSyVrBmSMuFe7T_6SLNHr8fq07dFcYHQhlYcXrX0iD4UMYB7zAj2l/s72-c/Back-to-top.jpg
Shoutersclub
https://shoutersclub.blogspot.com/2016/08/add-back-to-top-button-in-blogger.html
https://shoutersclub.blogspot.com/
https://shoutersclub.blogspot.com/
https://shoutersclub.blogspot.com/2016/08/add-back-to-top-button-in-blogger.html
true
8381117760632491081
UTF-8
Not found any posts VIEW ALL Readmore Reply Cancel reply Delete By Home PAGES POSTS View All RECOMMENDED FOR YOU LABEL ARCHIVE SEARCH ALL POSTS Not found any post match with your request Back Home Sunday Monday Tuesday Wednesday Thursday Friday Saturday Sun Mon Tue Wed Thu Fri Sat January February March April May June July August September October November December Jan Feb Mar Apr May Jun Jul Aug Sep Oct Nov Dec just now 1 minute ago $$1$$ minutes ago 1 hour ago $$1$$ hours ago Yesterday $$1$$ days ago $$1$$ weeks ago more than 5 weeks ago Followers Follow THIS CONTENT IS PREMIUM Please share to unlock Copy All Code Select All Code All codes were copied to your clipboard Can not copy the codes / texts, please press [CTRL]+[C] (or CMD+C with Mac) to copy