Saturday, February 6, 2016

Wordprss- Add Scroll To Top Button in Wordprss

 Add Scroll To Top Button in Wordprss


Step-1 Add this Div in footer.php

<div id="back_top" style="display: block;"></div>

Step-2 Add this Java script in footer.php

<script type="text/javascript">
    jQuery(function() {
        jQuery(window).scroll(function() {
        if(jQuery(this).scrollTop() > 300) {
        } else {
       jQuery('#back_top').click(function() {

Step-3 Add this CSS in styles.css

<style type="text/css">
    #back_top {
    background-color: red;
    bottom: 22px;
    cursor: pointer;
    display: none;
    height: 44px;
    position: fixed;
    right: 200px;
    width: 54px;

No comments :

Post a Comment