Skip to content

Using flickity hash in website with subfolders. #6

Open
@jorisvanhouts

Description

@jorisvanhouts

Hi,

Thanks for creating and sharing flickity hash.

I noticed when using flickity in a website with subfolders (e.g. https://www.site.com/subfolder/). The browser address is replaced with only the domain and the hash (https://www.site.com/#slide-1). If a user manually refreshes the pages after this change. the browser redirects back to root, which is our case is not desirable.

I changed the onChangeHash function to bypass this issue:
var url = window.location.pathname + '#' + id;

Maybe this could be a nice addition to your library?

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions