• your solution of opening first the page and then scroll to the id is marvelous.
    Is it possible to have than no url change in the browser adress.
    So it is only there the “parent” url – without the hash part?
    Thanks

    there are some solutions for one page sites but not for coming from a different site.
    Maybe it can be done by split the url at # goto page before the # and then scroll to the rest without changing browser url

Viewing 5 replies - 1 through 5 (of 5 total)
  • Plugin Author malihu

    (@malihu)

    Hello and thank you for your comments,

    At the moment, there’s no option for obscuring the URL hash when coming from a different page/URL.
    I can’t really say if or when such feature will be implemented as it’s not standard browser behavior and will affect user experience. What I mean is that the majority of users want to be able to use browser’s back/forward buttons (i.e. browser history), bookmark the page section etc. when changing pages.

    I’ll have to examine this further and see if/how to implement such option.

    Edit: Is there a specific reason for wanting this? Do you want to hide the hash value because it’s not indicative enough (e.g. value is section-1)?

    • This reply was modified 7 years, 9 months ago by malihu.
    Thread Starter Guenni007

    (@guenni007)

    for me i can give them as you say indicative IDs – so i agree to you that even for SEO reasons too i like those urls. But it was an upcomming question from a friend of mine if it is possible. On Onepage Site Solutions this might be a meaningfull request – and there are some Snippets for functions.php (of child-theme) to hide the hash value.
    On my superficial knowledge of jquery i thought it might be possible to split the url at the hash – navigate to the part before the hash – and do then the scroll effect with a little delay to the part after the hash. In this case scrolling was on same page – not coming from another one.

    Thread Starter Guenni007

    (@guenni007)

    so btw. thanks for your fast reply – and on the post above this is definitly nothing for a support of your plugin. So i just thought because you solved it very elegant with opening first the page and then scroll to id – this could be only one more littel thing to avoid url change .
    Can be close then.

    Plugin Author malihu

    (@malihu)

    Just for clarification (in case I didn’t fully understand the issue):

    If the targets are on the same page with the links, the page should not reload.
    If it does reload, then there must be a problem with the links URL. For example, if you’re using the full URL in your links, make sure it matches exactly the URL you see in browser’s address bar (e.g. missing or having the www part will affect this).

    Please let me know if you have an issue like this as the solution is usually very simple ??

    • This reply was modified 7 years, 9 months ago by malihu.
    Thread Starter Guenni007

    (@guenni007)

    you can see here a testpage: https://webers-testseite.de/kokon/abc/
    if you go to the menu and click Sprungmarke1 the site only scrolls down without changing the url.
    Because this is reached via event.preventDefault() this does not work coming from a different site – because the link then would not work.

    If you got a Menu Point link looks like: https://example.com/something/#ID1
    my thought was that i can dynamically change the clicked link by shorten it to the url before the “#” (f.e.: window.location.href.split('#')[0] ) open that new url under changing the browser window url – and then do the scroll on same click event . but i’m just starting to learn jQuery – and my skills are obviously to low.

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘scroll to id of different page’ is closed to new replies.