Jump to content
  • Sign in to follow this  

    Плавная прокрутка


    Silence

    Плавная прокрутка

    Перейти к ACP > Customizations > Themes > ваша тема > edit HTML and CSS > core > front > global > clobalTemplate и найти:

    <!--ipsQueryLog-->

    после его поставит ето код:

    Спойлер
    <script type="text/javascript">  
     jQuery(function(){  
      $("#Go_Top").hide().removeAttr("href");  
      if ($(window).scrollTop()>="250") $("#Go_Top").fadeIn("slow")  
      $(window).scroll(function(){  
      if ($(window).scrollTop()<="250") $("#Go_Top").fadeOut("slow")  
      else $("#Go_Top").fadeIn("slow")  
      });  
    
      $("#Go_Bottom").hide().removeAttr("href");  
      if ($(window).scrollTop()<=$(document).height()-"999") $("#Go_Bottom").fadeIn("slow")  
      $(window).scroll(function(){  
      if ($(window).scrollTop()>=$(document).height()-"999") $("#Go_Bottom").fadeOut("slow")  
      else $("#Go_Bottom").fadeIn("slow")  
      });  
    
      $("#Go_Top").click(function(){  
      $("html, body").animate({scrollTop:0},"slow")  
      })  
      $("#Go_Bottom").click(function(){  
      $("html, body").animate({scrollTop:$(document).height()},"slow")  
      })  
     });  
     </script>  
    
     <a style='position: fixed; bottom: 300px; right: 1px; cursor:pointer; display:none;'  
     href='#' id='Go_Top'>  
      <i class="fa fa-chevron-up" aria-hidden="true"></i>  
     </a>  
     <a style='position: fixed; bottom: 250px; right: 1px; cursor:pointer; display:none;'  
     href='#' id='Go_Bottom'>  
      <i class="fa fa-chevron-down" aria-hidden="true"></i>  
     </a>

     

    Ето все  ... ;)

     

    AEqurhwrCU.mp4

    Sign in to follow this  


    User Feedback

    Recommended Comments

    новый медленный код

    <script type="text/javascript">  
     jQuery(function(){  
      $("#Go_Top").hide().removeAttr("href");  
      if ($(window).scrollTop()>="250") $("#Go_Top").fadeIn("slow")  
      $(window).scroll(function(){  
      if ($(window).scrollTop()<="250") $("#Go_Top").fadeOut("slow")  
      else $("#Go_Top").fadeIn("slow")  
      });  
    
      $("#Go_Bottom").hide().removeAttr("href");  
      if ($(window).scrollTop()<=$(document).height()-"999") $("#Go_Bottom").fadeIn("slow")  
      $(window).scroll(function(){  
      if ($(window).scrollTop()>=$(document).height()-"999") $("#Go_Bottom").fadeOut("slow")  
      else $("#Go_Bottom").fadeIn("slow")  
      });  
    
      $("#Go_Top").click(function(){  
      $("html, body").animate({scrollTop:0},2000)  
      })  
      $("#Go_Bottom").click(function(){  
      $("html, body").animate({scrollTop:$(document).height()},2000)  
      })  
     });  
     </script>  
    
     <a style='position: fixed; bottom: 300px; right: 1px; cursor:pointer; display:none;'  
     href='#' id='Go_Top'>  
      <i class="fa fa-chevron-up" aria-hidden="true"></i>  
     </a>  
     <a style='position: fixed; bottom: 250px; right: 1px; cursor:pointer; display:none;'  
     href='#' id='Go_Bottom'>  
      <i class="fa fa-chevron-down" aria-hidden="true"></i>  
     </a>

     

    Share this comment


    Link to comment
    Share on other sites


    Create an account or sign in to comment

    You need to be a member in order to leave a comment

    Create an account

    Sign up for a new account in our community. It's easy!

    Register a new account

    Sign in

    Already have an account? Sign in here.

    Sign In Now

×