Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature request - Set animation type #10

Open
danimalweb opened this issue Apr 28, 2017 · 4 comments
Open

Feature request - Set animation type #10

danimalweb opened this issue Apr 28, 2017 · 4 comments

Comments

@danimalweb
Copy link
Collaborator

The ability to set the animation type, e.g. swing, ease, linear etc as part of the initialization process would be useful.

@mrchimp
Copy link
Owner

mrchimp commented Apr 29, 2017

Internally Hashy uses the jQuery animate function. By default this only supports swing or linear. I don't want Hashy to require another plugin just for something optional. However, I can expose some options for the animation function so you can include jQuery UI (or whatever library you like) and then pass some options in like:

Hashy.init({
    animate_options: {
        easing: 'ease-in-out',
    }
});

This will be in version 2, along with an updated API.

@mrchimp
Copy link
Owner

mrchimp commented May 1, 2017

Check 2.0.0-b and let me know what you think.

Note that I've changed the API so init and scrollToHash now take option objects. Check the docs.

@danimalweb
Copy link
Collaborator Author

danimalweb commented May 1, 2017

I don't see any new branches. - IGNORE.

I see the commit.

@mrchimp
Copy link
Owner

mrchimp commented May 31, 2019

2.0.0 now doesn't use jQuery for animation so this complicates things a bit. But I should be able to add the ability to pass a custom easing function. Then you can do what you like with it.

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

No branches or pull requests

2 participants