The forum of the forums
Would you like to react to this message? Create an account in a few clicks or log in to continue.

How do I add this feature?

3 posters

Go down

How do I add this feature? Empty How do I add this feature?

Post by Cool-Guy February 9th 2012, 1:09 pm

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. I love you
avatar
Cool-Guy
Forumember

Posts : 295
Reputation : 0
Language : English

Back to top Go down

How do I add this feature? Empty Re: How do I add this feature?

Post by ReDMizT February 9th 2012, 2:02 pm

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. I love you

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
ReDMizT
Forumember

Male Posts : 178
Reputation : 4
Language :
Location :

Back to top Go down

How do I add this feature? Empty Re: How do I add this feature?

Post by Cool-Guy February 9th 2012, 2:19 pm

And that is?
avatar
Cool-Guy
Forumember

Posts : 295
Reputation : 0
Language : English

Back to top Go down

How do I add this feature? Empty Re: How do I add this feature?

Post by ReDMizT February 9th 2012, 2:48 pm

you said that you want the "back to top" and that is the code...
ReDMizT
ReDMizT
Forumember

Male Posts : 178
Reputation : 4
Language :
Location :

Back to top Go down

How do I add this feature? Empty Re: How do I add this feature?

Post by Cool-Guy February 9th 2012, 4:06 pm

Obviously I was referring to what you actually said, which would mean that I am asking what the "overall_footer_end" is...
avatar
Cool-Guy
Forumember

Posts : 295
Reputation : 0
Language : English

Back to top Go down

How do I add this feature? Empty Re: How do I add this feature?

Post by ReDMizT February 9th 2012, 4:21 pm

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
ReDMizT
Forumember

Male Posts : 178
Reputation : 4
Language :
Location :

Back to top Go down

How do I add this feature? Empty Re: How do I add this feature?

Post by Cool-Guy February 9th 2012, 4:37 pm

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. How do I add this feature? Oops
avatar
Cool-Guy
Forumember

Posts : 295
Reputation : 0
Language : English

Back to top Go down

How do I add this feature? Empty Re: How do I add this feature?

Post by LGforum February 9th 2012, 11:37 pm

You can use a simple back to the top link like so:

Code:

<a href="#">Back To the Top</a>

Fancy back to the top animations are horrible and hard on the system.
LGforum
LGforum
Hyperactive

Male Posts : 2265
Reputation : 264
Language : English
Location : UK

Back to top Go down

Back to top


 
Permissions in this forum:
You cannot reply to topics in this forum