Akbarali
XuSha, # XuSha (25.01.2019 / 19:04)
Master-X, sizni saytingizdagiday sahifani pastiga tushganda TEPAGA dip chiqadiyu shuni qaysi kod orqali qoysam boladi?
  1. <script type="text/jаvаsсriрt" src="https://ajax.googleapis.com/ajax/libs/jquery/1.12.4/jquery.min.js"></script>
  2. <script type="text/jаvаsсriрt">
  3. $(function() {
  4. $.fn.scrollToTop = function() {
  5. $(this).hide().removeAttr("href");
  6. if ($(window).scrollTop() >= "250") $(this).fadeIn("slow")
  7. var scrollDiv = $(this);
  8. $(window).scroll(function() {
  9. if ($(window).scrollTop() <= "250") $(scrollDiv).fadeOut("slow")
  10. else $(scrollDiv).fadeIn("slow")
  11. });
  12. $(this).click(function() {
  13. $("html, body").animate({scrollTop: 0}, "slow")
  14. })
  15. }
  16. });
  17. $(function() {
  18. $("#Go_Top").scrollToTop();
  19. });
  20. </script>
  21. <a style="position: fixed; bottom: 25px; right: 1px; cursor: pointer; display: block;" id="Go_Top">
  22. <img src=" https://saytuz.ru/gotop.png alt="Наверх" title="Yuqoriga" width="50px"></a>

.
Juda murakkablashtrib yubordima ? . tepaga knopkasini oddiy div=id bilan qilsa ham bo'ladi.
.
1000 postim ekan.