Tagged: 

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • Pankaj Sharma Moderator
    #1000590

    Hi
    Do u mean by back to top button?

    rn3ant Friend
    #1000594

    Do u mean by back to top button?

    Yes, I do.

    Pankaj Sharma Moderator
    #1000735

    Hi
    Go to /css/custom.css file and add below code

    .back-to-top {background:#b4afaf;bottom: 45px;height: 40px;margin: 0;position: fixed;right: 16px;width: 40px;z-index: 1000;
    .transition(opacity 350ms);border-radius:25px;display: none;}
    .back-to-top.reveal {opacity(30)cursor: pointer;display: block;}
    .back-to-top:hover { background-color: #908e8e; cursor: pointer;} 
    .back-to-top.active { display: block; } 
    .fa-angle-double-up:before { color: #fff; font-size: 30px; line-height: 1em; left: 35%; margin-top: -17px; margin-left: -3px;  position: absolute;  top: 50%;  bottom:30px; }
    

    Now open index.php file in template folder Add this code after line 216

    <div id="back-to-top" class="back-to-top">
    
    <i class="fa fa-angle-double-up"></i>
    
    </div>
    <script type="text/javascript">
    
    //<![CDATA[
    (function($){
    $(document).ready(function(){
    $('#back-to-top').click(function(){
    if($(this).hasClass('reveal')){
    $('html, body').stop(true).animate({
    scrollTop: 0
    });
    }
    });
    
    $(window).scroll(function(){
    $('#back-to-top').toggleClass('reveal', $(window).scrollTop() > (Math.min($('#mainbody').length ? $('#mainbody').offset().top : 0, 1500)));
    });
    });
    })(jQuery);
    //]]>
    
    </ script>

    Here >>> http://prntscr.com/dt808a
    (remove the space between / and script in last line of code </ script )

    Hope it helps.

    rn3ant Friend
    #1000757

    Hope it helps.

    Cool! It works!
    Thank you very much!

    Best regards,
    Vit, RN3ANT

Viewing 4 posts - 1 through 4 (of 4 total)

This topic contains 4 replies, has 2 voices, and was last updated by  rn3ant 7 years, 3 months ago.

The topic ‘Scroll-Up button’ is closed to new replies.