queue  916
support custom
Page 1 of 2 12 LastLast
Results 1 to 10 of 11

Thread: [SOLVED] Links from Single-Pages back to Sections – via Menu – not working right (in Firefox)

  1. #1

    Links from Single-Pages back to Sections – via Menu – not working right (in Firefox)

    Hello there! First of all: nice Theme!

    But I am having a Problem:

    1.) When I click on one of the links of the menu from a single page back to the sub-pages/sections of the home are not going to the right sections, they are jumping somewhere in-between (mostly in Firefox)

    I am looking forward to your answer!

    Best Mara

  2. #2
    Lead Support Ante's Avatar
    Join Date
    Oct 2012
    Posts
    13,410
    Hi there Mara,

    add this to your Custom JS field in Theme Options panel:
    Code:
    jQuery( function( $ ) {
    
    setTimeout( function() {
    
    	if ( '' !== window.location.hash && $( 'body' ).find( '#' + window.location.hash.substring( 1 ) ).length ) {
    
    		$('html, body').animate({ scrollTop: $( 'body' ).find( '#' + window.location.hash.substring( 1 ) ).offset().top - $( '#the-navigation' ).height() }, 0);
    
    	}
    
    }, 2000 );
    
    });
    That should do the trick

  3. #3
    Hello Ante!

    Thanks for your answer, it works, but not totally in the right manner, there is a kind of delay, the user is still seeing the wrong section, for a short time (in Firefox),
    than it jumps finally to the right position.
    Safari jumps directly to the right position, but there is not enough space between the headline and the navigation-area, and now, again a short delay, than its in the final position…

    Do you have an idea, how to fix this?

    M.

  4. #4
    one comment on this:

    on your demo-site happens the same problem (when I am testing it with Firefox): when you are at a sub-page, e.g. BLOG

    http://haven.themes.pixelentity.com/blog/

    and you want to go back to e.g. WORK, its not jumping right! When I go from BLOG to SERVICES it jumps to the right position, but with no space between headline »SERVICES« and Navigation.

  5. #5
    Hello Ante,

    do you already know how to fix it in different way?

    Kind regards M.

  6. #6
    Lead Support Ante's Avatar
    Join Date
    Oct 2012
    Posts
    13,410
    Hi there,

    please, in the code above, try reducing the 2000 (last line) to something like 500 or even less, test until you get as small delay as possible.

    The reason this issue happens is because content is not loaded yet fully on page load, so theme does not know where exactly it needs to scroll to.

  7. #7
    Hi Ante!

    Aah, thank you! I changed the 2000 in 100, and it works! There is quasi no more delay in Firefox, a tiny bit in Safari, but better than before,

    One thing is missing: when you are at a blog-post-page (single), the contact-navigation link back to the home does not work (and there is no contact-formular in the footer of the single-template.)

    Is there a way to make the contact-link work, going also back to the home, when you are at a blog-post?

  8. #8
    Lead Support Ante's Avatar
    Join Date
    Oct 2012
    Posts
    13,410
    Hi,

    how did you insert your contact link? If it's just
    Code:
    #contact
    , then change it to say
    Code:
    http://yourdomain.com/#contact

  9. #9
    Hi Ante,

    thank you! That works fine now

    sorry for bothering more about this, but is there a way to make all navigation-links work like this? I mean, only when you are at a subpage or article-page going back to the home, because the re-positioning is better now, but still a bit »shakily«...

  10. #10
    Lead Support Ante's Avatar
    Join Date
    Oct 2012
    Posts
    13,410
    I'm afraid further improvement with the current setup is not possible, or at least I don't know of a way to improve it.