Skip to content

Visibility and multiple calls#2

Open
terryaney wants to merge 1 commit intoSuperhands89:masterfrom
terryaney:feature/element-visibility
Open

Visibility and multiple calls#2
terryaney wants to merge 1 commit intoSuperhands89:masterfrom
terryaney:feature/element-visibility

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