- 28 Eki 2013
- 7,264
- 2
SMF Forumunuz için "Yukarı Git" Butonu Yapma
Adım 1: Temanızın index.css dosyasını açın ve en sonuna ekleyin:
Adım 1: Temanızın index.css dosyasını açın ve en sonuna ekleyin:
Kod:
Adım 2: Temanızın index.template.php dosyasını bulun ve içindeki şu kodu arayın:.go-top { position: fixed; bottom: 2em; right: 2em; text-decoration: none; color: #fff; background: #666; font-size: 14px; padding: 1em; display: none; } .go-top:hover { background: #333; }
Kod:
Adım 4: Yine index.template.php'de arıyoruz:
Not: Butonda Yukarı Git yerine bir resim (yukarı ok gibi) gözüksün istiyorsanız Yukarı Git yazısının yerine resim kodunu ekleyin.<a href="javascript:****(0)" class="go-top">Yukarı Git</a>
Adım 4: Yine index.template.php'de arıyoruz:
Alıntı:
Adım 5: Üstteki kodun hemen öncesine ekliyoruz:</body></html>';
}
// Show a linktree. This is that thing that shows "My Community | General Category | General Discussion"..
Kod:
<!-- JavaScript --> <script src="http://ajax.googleapis.com/ajax/libs/jquery/1.9.1/jquery.min.js"></script> ********** $(********).ready(function() { // Show or hide the sticky footer button $(window).scroll(function() { if ($(this).scrollTop() > 200) { $(".go-top").fadeIn(200); } else { $(".go-top").fadeOut(200); } }); // Animate the scroll to top $(".go-top").click(function(event) { event.preventDefault(); $("html, body").animate({scrollTop: 0}, 300); }) }); </script>