New Landing How can we help? Themeforest Theme Support Dante Couple of Deep Linking Questions

Tagged: ,

Viewing 9 posts - 1 through 9 (of 9 total)
  • Posted in: Dante
  • #65019
    logicbroker
    Member
    Post count: 21

    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.

    #65358
    Mohammad – SUPPORT
    Moderator
    Post count: 27441

    Hi,
    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 Ideas

    #65361
    logicbroker
    Member
    Post count: 21

    The 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

    #65582
    Mohammad – SUPPORT
    Moderator
    Post count: 27441

    Hi,
    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 -> JS

    jQuery(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 .

    #65711
    logicbroker
    Member
    Post count: 21
    This reply has been marked as private.
    #65755
    Mohammad – SUPPORT
    Moderator
    Post count: 27441

    Hi,
    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

    #148982
    lingokid
    Member
    Post count: 9

    Admin is there no way to clear the anchor in the url if deeplinking back to a OnePage style home page?

    Here is the example

    News

    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

    #148988
    Rui Guerreiro – SUPPORT
    Keymaster
    Post count: 25779

    Hi,

    Will forward your suggestion to the development team.
    Thanks

    -Rui

    #149070
    Swift Ideas – Ed
    Keymaster
    Post count: 15264

    Hi 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

Viewing 9 posts - 1 through 9 (of 9 total)

You must be logged in and have valid license to reply to this topic.

License required for the following item
Login and Registration Log in · Register