Skip to content

Using flickity hash in website with subfolders. #6

@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?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions