View Full Version : Back to top
DemOnstar
11-28-2013, 02:34 PM
How does one include a 'back to top' link in the navbar?
On the same note, can we also remove the 'back to top' link from the footer?
Thanks for you input...
ozzy47
11-28-2013, 02:50 PM
Why would you need a back to top in the navbar, your not far at all from the top. :)
tbworld
11-28-2013, 03:06 PM
How does one include a 'back to top' link in the navbar?
On the same note, can we also remove the 'back to top' link from the footer?
Thanks for you input...
Is it possible you worded your question incorrectly? Otherwise I have to agree with @Ozzy47 on this. Anyway, both are easy concepts, that we can provide you if this is what you really want.
What I do not understand is, the 'back-to-top' on the footer is needed -- you're at the bottom, compared to inserting it at the 'navbar' as @Ozzy47 stated is usually near the top.
Straighten us out! :)
ozzy47
11-28-2013, 03:10 PM
Yeah I just wanted clarification, both are quite possible. :)
DemOnstar
11-28-2013, 03:26 PM
Ok, to clear things up a tad...
I understand what it is you are telling me but due to my inability to code with any competence, my floating navbar efforts have prevented the 'back to top' link in the footer from working..
Also, the navbar is the navbar and as such, should be the main area of navigation..
I very rarely go to the bottom of the page and touch the footer but the floating thing is always there and I get used to it.. For myself, it just seems the most natural place to put the extra element 'back to top' in the navbar...
I understand your queries in this case but we are all different in our requirements and I was just wondering how to achieve my unusual request...
Thanks to the pair of you for being so prompt...
ozzy47
11-28-2013, 03:38 PM
Ok in the Navigation Manager, make a new tab and add the following in the field, Target URL.
{vb:raw relpath}#top" onclick="document.location.hash='top'; return false;
To remove from the footer, it that template find the following:
<li><a href="{vb:raw relpath}#top" onclick="document.location.hash='top'; return false;">{vb:rawphrase top}</a></li>
And change it to this:
<vb:comment><li><a href="{vb:raw relpath}#top" onclick="document.location.hash='top'; return false;">{vb:rawphrase top}</a></li></vb:comment>
tbworld
11-28-2013, 03:45 PM
Thanks for replying @DemOnStar. I am guessing the floating 'navbar' is 'CSS positioned fixed' at the top of the page, thus it is available even when you get to the bottom of the page. If this is the case I get the picture.
Thanks @Ozzy47 for helping him out. :)
DemOnstar
11-28-2013, 04:12 PM
Cheers guys... Quick response but no success...
Ozzy47, I have no doubt that your instructions are correct.. I have a link in the navbar, I have also removed the link from the footer using your instruction but I feel that the JS script I created is preventing or hiding the true top of the page...Possibly css related also..
How do I truly ID the top of the page?
ozzy47
11-28-2013, 04:15 PM
I don't know, without testing it, there is no way to know.
tbworld
11-28-2013, 04:17 PM
Cheers guys... Quick response but no success...
Ozzy47, I have no doubt that your instructions are correct.. I have a link in the navbar, I have also removed the link from the footer using your instruction but I feel that the JS script I created is preventing or hiding the true top of the page...Possibly css related also..
How do I truly ID the top of the page?
We need a link to the site, so we can see the source for the page.
DemOnstar
11-28-2013, 04:38 PM
Ok...
https://www.noneedforthetimebeing.com
Much appreciated...
tbworld
11-28-2013, 05:35 PM
I feel that the JS script I created is preventing or hiding the true top of the page.
Yep, your right. All that needs to be done is to alter your JavaScript, adding a function to scroll to top and patching the JavaScript in the navbar to call that function. I have to run since it is 'Thanksgiving', but I will take a look at it later tonight for you.
DemOnstar
11-29-2013, 02:07 AM
Yep, your right. All that needs to be done is to alter your JavaScript, adding a function to scroll to top and patching the JavaScript in the navbar to call that function. I have to run since it is 'Thanksgiving', but I will take a look at it later tonight for you.
Hell, I thought I had finished with JS...
Enjoy the celebration...
ozzy47
11-29-2013, 02:32 AM
Ok what we need to do then is create a anchor for the pages. Open your header template, and at the very beginning, add the following:
<a name="anchor"></a>
Then edit the tab you made for the Top, and change the field, Target URL to this:
{vb:raw relpath}#anchor" onclick="document.location.hash='anchor'; return false;
DemOnstar
11-29-2013, 06:27 AM
Mr Ozzy47, you appear to be unstoppable...
Job done! Good fella.......
Without your good self and tbworld, this site would not be the flurry of activity that it is now..
It is a little unfair to mention names as there are one or 2 more including Mr Lloyd but you 2 boys have helped me tremendously..
I am sure the appreciation goes out site wide...
Well done chaps! First rate......
tbworld
11-29-2013, 09:10 AM
There are a lot of good knowledgeable folks around here, most of them know far more about vBulletin then I do. I certainly am learning as much as I am giving. It is enjoyable helping others with their projects especially when they allow us to be interpersonal with them and their project. Thanks for the comment, it is nice to hear now and then.
By the way, I am doubting that @Ozzy47 is a real person, he may be a coding bot of some sort. :)
DemOnstar
11-29-2013, 03:01 PM
By the way, I am doubting that @Ozzy47 is a real person, he may be a coding bot of some sort. :)
Have to agree on this one..
The best programmers built him.
ozzy47
11-29-2013, 03:04 PM
You would have to ask, Oscar Goldman how I was built. :)
DemOnstar
11-29-2013, 03:16 PM
Some secrets are never passed on....
vBulletin® v3.8.12 by vBS, Copyright ©2000-2025, vBulletin Solutions Inc.