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

Visibility and multiple calls #2

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

terryaney
Copy link

I have situation where I hide elements that have scroll-indicator class. So I needed easyScrollDots to not display those. I see that you are mostly trying to not use jquery, so I attempted too, but admittedly, js is not my primary language. You may find a better way to implement isHidden. I simply used this https://stackoverflow.com/a/21696585/166231.

Additionally, I re-organized the code to allow easyScrollDots to be called multiple times (i.e. after some visibility changes). Again, a few things to note:

  1. With jQuery events, the way I understand it, if you remove an element that had events attached, it also removes events. I wasn't sure with 'event listener'. You can correct if wrong.
  2. I'm not sure if there is a way to detect which dot to make active after rebuild or not. If you know how, I'll let you think about it.

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

Successfully merging this pull request may close these issues.

1 participant