Digital experiences for all disciplines
New Landing › How can we help? › Themeforest Theme Support › Dante › Anchor Link point changes on page refresh
New Landing › How can we help? › Themeforest Theme Support › Dante › Anchor Link point changes on page refresh
- This topic has 11 replies, 5 voices, and was last updated 10 years by Swift Ideas – Ed.
-
Posted in: Dante
-
December 12, 2014 at 4:16 am #135263
Hi
I have created a number of anchor link ids in a page http://173.248.187.12/~sixpoint/investment-strategies-2/ to then be used as custom menu links. The place on the page where the link goes to when clicked changes, so sometimes it sits where I need the title to, under the main menu and other times the anchor seems to be higher so the title sits underneath the menu (no good). It seems to go to the correct place the first time the page is loaded, or on a page refresh, but if you click on different menu links(with different anchor points on that page) the title bit sits to close to the top of the page (underneath the menu)
the anchor ids are
id=”dollar”
id=”riskmanagement”
id=”debtstructuring”
id=”education”the menu links are dropped down from ‘Investment Strategies’
Thanks
AmberAttachments:
You must be logged in to view attached files.December 12, 2014 at 12:27 pm #135369Hi
Can you try adding the smooth-scroll-link class the the menu items so that is scrolls smoothly
– Kyle
December 12, 2014 at 11:15 pm #135487Sorry I don’t know what that is?
Could you please explain what I need to do?
thanks, Amber.
December 14, 2014 at 11:25 pm #135594Hi,
Go to Appearance -> Menus and go to that menu you have those links, click Screen Options at the very right top check the CSS Classes, then in the Custom links you create paste this in that CSS Classes (optional) “smooth-scroll-link” without quotes. And see that works or not.
Let us know,
Thanks,
laranz.December 15, 2014 at 12:07 am #135602Hi,
Ok, tried that but it didn’t work.
thanks, Amber
December 15, 2014 at 9:00 am #135656I don’t see the class on your links, can you provide me with a login so I can check for you and set it up if I need to
– Kyle
December 15, 2014 at 9:58 am #135688This reply has been marked as private.December 15, 2014 at 11:58 am #135739Unfortunately it won’t work because you’re using multiple pages, the smooth scroll link can only work when you add #rowid for the link, but you need to use the full url so that it can work from other pages.
Will check with Rui to see if he knows how to fix the issue
– Kyle
December 15, 2014 at 1:38 pm #135765Hi,
It seems that you add the id’s using this type of code
<h1 id="riskmanagement"></h1>
You should use the Blank Spacer element instead and fill the Spacer id fill.-Rui
December 15, 2014 at 11:26 pm #135867Hi Rui
When I add the id=”riskmanagement” into the blank spacer it does nothing. The menu link then goes nowhere, I am assuming this is because of the shortcode?
[blank_spacer id=”riskmanagement” height=”30px” width=”1/1″ el_position=”first last”]
Kyle, All the menu item / anchor links in the drop down are all on the same page, plus the menu link uses the full url as well.
I’m still not sure why when you click on the particular menu items that are an anchor link, the position on the page they go to changes depending on whether it is the first time the page as a whole has loaded or whether you are already on that page from a different anchor link.
Thanks
AmberDecember 17, 2014 at 5:03 pm #136374Hi,
Guess you shouldn’t use in the menu the full url, use only the #dollar format.
Will forward this one to Ed so it can help us out about the anchor link points.
-Rui
December 19, 2014 at 11:11 pm #136909Hi @ronin
Unfortunately if you have the full URL as a menu item, then the browser overrides the functionality, you’d need to have the # links as the menu item for the theme to be able to scroll it.
We are planning to add an option to override the menu on a per-page basis, so that you could have # links and it would only appear on that page.
– Ed
-
Posted in: Dante
You must be logged in to reply to this topic.