-SMF Forumunuz için "Yukarı Git" Butonu Yapma--
-Adım 1:--- Temanızın index.css dosyasını açın ve en sonuna ekleyin:--
Kod:
.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; }
---Adım 2:--- Temanızın index.template.php dosyasını bulun ve içindeki şu kodu arayın:----
Kod:
<div id="footer">
-----Adım 3: Üstteki kodun hemen öncesine ekleyin:------
Kod:
<a href="javascript:****(0)" class="go-top">Yukarı Git</a>
-----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.--
----
-----Adım 4:--- Yine index.template.php'de arıyoruz:------
Kod:
</body></html>';
}
// Show a linktree. This is that thing that shows "My Community | General Category | General Discussion"..
-----Adım 5: Üstteki kodun hemen öncesine ekliyoruz:------
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>
