Digital experiences for all disciplines
New Landing › How can we help? › Themeforest Theme Support › Dante › Couple of Deep Linking Questions
New Landing › How can we help? › Themeforest Theme Support › Dante › Couple of Deep Linking Questions
Tagged: Dante, deep links
- This topic has 8 replies, 5 voices, and was last updated 9 years by Swift Ideas – Ed.
-
Posted in: Dante
-
April 7, 2014 at 2:40 pm #65019
Just a couple of quick questions with deep linking:
1) Is there a way for deep linking to use smooth scolling like the one-page nav or the back to top button? By default it just instantly jumps to the section.
2) Is there a way to offset the vertical position of the deep link? If you are using a sticky header, the start of the section I’m linking to appears underneath the header.
Thanks.
April 8, 2014 at 1:59 pm #65358Hi,
Have you tried this http://support.swiftideas.net/knowledgebase/how-to-create-a-one-page-site-using-the-one-page-navigation/ ? Please provide your URL and show me an example so i can check and try to give any possible solution .
Thanks 🙂
With Best Regards
Swift IdeasApril 8, 2014 at 2:10 pm #65361The site is in development and not available to the public and your response does not address either of my questions in any way.
1) I am not using one page nav, I am using a button to deep link further down the page to another section. Be default, this instantly jumps to the section rather than scrolling like the one-page nav. Is there a way I can change it to scroll.
2) This question was not even acknowledged. When deep linking to a section with sticky header enabled, the top of the section starts out underneath the header. Is there a way to offset this? Also, increasing the size of the spacer I am linking to is not an option as that will create uneccesary white space and break the flow of the page.
Thanks
April 9, 2014 at 9:19 am #65582Hi,
1- Set up your link as you normally do ,e.g. href=”#target_unique_id” (where target_unique_id is the id of your target)
Add a class=”scroll” attribute to the link element, so it now looks something like this:
<a href="#target_unique_id" class="scroll" >Scroll to target</a>
Finally add the following jQuery code at Admin -> Theme Options -> Custom CSS/JS -> JSjQuery(document).ready(function($) { $(".scroll").click(function(event){event.preventDefault(); $('html,body').animate({scrollTop:$(this.hash).offset().top}, 500); }); });
2- Sticky header will come automatically . We dont need extra code for it .
April 9, 2014 at 2:33 pm #65711This reply has been marked as private.April 9, 2014 at 3:41 pm #65755Hi,
1- Please install it http://wordpress.org/plugins/easy-smooth-scroll-links/ .2- There is only one solution to increase spacer height or try to put more content before it .
Thanks
February 11, 2015 at 9:13 am #148982Admin is there no way to clear the anchor in the url if deeplinking back to a OnePage style home page?
Here is the example
Click any button in the top nav, they all jump to the home page and then to the section but the scroll is jumpy and the /#anchorname is still present.
There has to be a way to reuse the script that makes it all work on one page to work with landing pages and such to push you back to the spot on the home page smoothly and remove the /#anchorname
Thanks
February 11, 2015 at 9:31 am #148988Hi,
Will forward your suggestion to the development team.
Thanks-Rui
February 11, 2015 at 1:41 pm #149070Hi guys,
Unfortunately if you are coming from another page with a # link, then it will jump to the section – we have no control over this, as it’s standard browser functionality.
If you set a menu item as a # link, then it will smooth scroll to the location, the same as if you create a custom link with the following anchor config:
<a href="#section" class="smooth-scroll-link">Link</a>
If you are having issues with smooth-scroll not scrolling to the correct place, please provide a link so that we can investigate, but as I said unfortunately linking from another page is controlled by native browser functionality.
– Ed
-
Posted in: Dante
You must be logged in and have valid license to reply to this topic.