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

reset method? #3

Open
beezlebug opened this issue Dec 21, 2015 · 1 comment
Open

reset method? #3

beezlebug opened this issue Dec 21, 2015 · 1 comment

Comments

@beezlebug
Copy link

Hi Rafael,
really nice work on this plugin, I like it a lot :-)

I try to use the animated wheel counter in a tab page (using http://os.alfajango.com/easytabs/). It works fine, but I ran into the problem, that when the animated wheel counter is in the second tab (for example), someone enters the page, reads the first tab (scrolling down), switches over to the second tab and scrolls down again, then there is no animation, because the wheel counter was already scrolled in (but not seen, because the visitor was reading the first tab).
To solve this I would like to bind a reset.counter method to the switch tab event (or add a check for the visability of the counter when scrolled in). Sadly I have no clue how to do this.

(sorry for my bad english)

All the best

@rexblack
Copy link
Member

rexblack commented May 7, 2016

I'm very sorry, but i missed this. Of course my answer will be too late, but i comment on this, since there may be others that have a similar problem.
I suggest to listen to desired events of the involved component and then trigger an update on countimator as described in the 'Trigger update'-section of the README.md. Unfortunately jquery-easytabs doesn't seem to fire a notification when a tab is just shown, only before and after the transition. But you could listen to the before-event and then do your action after a short delay using window.setTimeout.
I think that this is not an issue with countimator. The API-methods should be used to integrate countimator with your application. As far as i know, there's currently no native event that fires when an element gets visible.
Thank you very much for your contribution

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