How do I add this feature?
3 posters
Page 1 of 1
How do I add this feature?
http://www.footstepsofghosts.com/
At the right of this site, there is a symbol saying "top" if hovering it. If you click it, it takes you to the top of the forum.
How do I add this feature, and is it possible to choose exact location?
Thanks.
At the right of this site, there is a symbol saying "top" if hovering it. If you click it, it takes you to the top of the forum.
How do I add this feature, and is it possible to choose exact location?
Thanks.
Cool-Guy- Forumember
- Posts : 295
Reputation : 0
Language : English
Re: How do I add this feature?
Cool-Guy wrote:http://www.footstepsofghosts.com/
At the right of this site, there is a symbol saying "top" if hovering it. If you click it, it takes you to the top of the forum.
How do I add this feature, and is it possible to choose exact location?
Thanks.
put this in your overall_footer_end
- Code:
<script type="text/javascript">
jQuery(document).ready(function(){
jQuery('body').prepend('<span id="bm-top" />');
jQuery('body').append('<a href="#bm-top" id="bm-arrow-top">Back To Top</a>');
jQuery('#bm-arrow-top').bm_topLink({
min: 200,
fadeSpeed: 500
});
jQuery('#bm-arrow-top').click(function(e) {
e.preventDefault();
});
jQuery('a[href*=#]').click(function() {
if (location.pathname.replace(/^\//,'') == this.pathname.replace(/^\//,'') && location.hostname == this.hostname) {
var $target = jQuery(this.hash);
$target = $target.length && $target || jQuery('[name=' + this.hash.slice(1) +']');
if ($target.length) {
var targetOffset = $target.offset().top;
jQuery('html,body').animate({scrollTop: targetOffset}, 1000);
return false;
}
}
});
});
jQuery.fn.bm_topLink = function(settings) {
settings = jQuery.extend({
min: 1,
fadeSpeed: 200
}, settings);
return this.each(function() {
var el = jQuery(this);
el.hide();
jQuery(window).scroll(function() {
if (jQuery(window).scrollTop() >= settings.min) {
el.fadeIn(settings.fadeSpeed);
} else {
el.fadeOut(settings.fadeSpeed);
}
});
});
};
</script>
<style type="text/css">
a#bm-arrow-top {position:fixed; bottom:30px;right:30px; display:block;background:#fff; width:24px;height:24px; overflow:hidden; background:url(http://www.net-kit.com/wp-content/plugins/back2top/backtotop.png) top left no-repeat; text-indent:-99999em; text-decoration:none; outline:none; border:none;}
a:hover#bm-arrow-top {background-position:bottom left;}
</style>
ReDMizT- Forumember
- Posts : 178
Reputation : 4
Language :
Location :
Re: How do I add this feature?
And that is?
Cool-Guy- Forumember
- Posts : 295
Reputation : 0
Language : English
Re: How do I add this feature?
you said that you want the "back to top" and that is the code...
ReDMizT- Forumember
- Posts : 178
Reputation : 4
Language :
Location :
Re: How do I add this feature?
Obviously I was referring to what you actually said, which would mean that I am asking what the "overall_footer_end" is...
Cool-Guy- Forumember
- Posts : 295
Reputation : 0
Language : English
Re: How do I add this feature?
Cool-Guy wrote:Obviously I was referring to what you actually said, which would mean that I am asking what the "overall_footer_end" is...
oops sorry you can find the overall_footer_end in admin panel => display => templates => general and look for overall_footer_end
ReDMizT- Forumember
- Posts : 178
Reputation : 4
Language :
Location :
Re: How do I add this feature?
No problem, except that if you take a look at my profile, you will see that I am on phpBB 3, which means I can't edit anything from that place.
Cool-Guy- Forumember
- Posts : 295
Reputation : 0
Language : English
Re: How do I add this feature?
You can use a simple back to the top link like so:
Fancy back to the top animations are horrible and hard on the system.
- Code:
<a href="#">Back To the Top</a>
Fancy back to the top animations are horrible and hard on the system.
LGforum- Hyperactive
- Posts : 2265
Reputation : 264
Language : English
Location : UK
Page 1 of 1
Permissions in this forum:
You cannot reply to topics in this forum