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

How To Listen To Swipe Event #4

Open
lifeelement opened this issue Feb 26, 2016 · 2 comments
Open

How To Listen To Swipe Event #4

lifeelement opened this issue Feb 26, 2016 · 2 comments

Comments

@lifeelement
Copy link

We are wiring this up with crossroads.js so that it scrolls by url change. We are still struggling to handle the legendary back button issue.

Any idea how to make it animate to the previous page when pressing the back button?

Regardless, how would you listen for the swipe event? We have other element indicators that need to change that work great when clicking buttons, but not on swipe.

Thanks

@trgraglia
Copy link
Owner

@lifeelement
A few differnent issues here:
Back button: Try the history api in the browser. https://developer.mozilla.org/en-US/docs/Web/API/History_API
Animate on back: I need to research a bit but i think it should work with the history api.
Swipe: Swipe should work if you have touchswipe. Which browser is it not working in?

For the history api on older browsers, you can use modernizer.

@lifeelement
Copy link
Author

This is pertain to mobile app concerns where the files are stored locally versus accessed online. With the History API, we didn't get much luck with it. Perhaps it needs new eyes on it, but it wasn't really working for us.

As for swiping, it does work and we're using IE 10, Edge, and Chrome 48. But we need to know how to listen to swipe events because we have an element/component that changes based on which screen/page is showing; you know the usual dots, circles, or squares that indicate what page you're on.

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

No branches or pull requests

2 participants