Back to top link on php included footer? - javascript

I have a footer section on my website where I want to include a back to Top link.
Problem is that it can't detect on which page of the site the user is so it sends it in the index html top. Is there any way to achieve this?
I can't use Back to top since I have a base href that links to the index page of the website.
This code worked well, cross browser too:
TOP

Add a named anchor in your page just before the content, to specify the top of your current page. Like:
<a name="top"></a>
<!-- Rest of your content here -->
Then in your footer, link to the anchor with:
Back to top

You don't need php for this.
Just add a link like this:
Back to top

Related

Manipulating page bookmark position

I'm using Bootstrap to create a single page portfolio, I'm using bookmark links to navigate the page, however I want the page to land earlier than the position it lands on, I am pointing to the div I assigned the Id to it. is there anyway to do it?
Let's say, you want to go to footer on click of Goto Footer link
Goto Footer
Then, the footer block should have
<div id="footer-block">Page Footer</div>

How to scroll and load a hidden id at the same time

My problem goes like this.
I have a tab on the left side and the content for each tab shows in the right side.the tab extends long way down so I should use page scroll to get bat to the top in order or the content to be viewed but I cant scroll and load the same time.
So whats happening is I need to double click the tab to load and scroll to the id to the top.can someone help me with this?
perhaps you could wrap the tabs in an anchor tag with href: and wrap the content in a div tag with the id <div id="content"></div>, this way, when you click on the tab it will redirect you to the content div without having to scroll yourself.

Direct links to the anchors do not work using jQuery Scrollto.js script

I have a site where I am using the jQuery scrollTo.js script to navigate back and forth within the main page of the site.
http://new-had.herrmanneasyeditdemo.com
The anchor links in the main nav work fine, however if you try to go to a page directly it takes you to the wrong anchor.
Click on this link: http://new-had.herrmanneasyeditdemo.com/#services
You will see that it does not take you directly to the services section. It actually takes you to the bottom of the "All in a Day’s Work" section.
Any ideas how to solve this problem?

Different Behavior between a direct link and href tag in a site made in bootstrap

I have a problem in a site made with bootstrap
If I set an href tag from an external page that landing on a section of my page, I have a strange behavior : the link sends me to the correct section but the navbar at the top of the menu marks the next item.
If the same link is typed directly from browser, instead, everything is working fine (the positioning of the page and the navbar menu).

Link open left div

i have this link http://www.tgi.com.pt/link/tabSlideOut.html
and my idea is the link content open the left div.
But I can't doing the desired effect
any suggestion?
Oh, i see -- you want the Content link to open the Contact thing. Well, I see your Content link (in footer (which is actually more of a header)) is:
<a id="handlee" href="#">Content</a>
so, that doesn't seem like it would ever do anything.
You do have another Content link down below, but that appears to be incorrectly included in your slide_out_div. Perhaps that Content link is supposed to be up above in the footer section where the other Content link is?

Categories