-
Notifications
You must be signed in to change notification settings - Fork 496
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
activateMiddle index and hidden items #207
Comments
You have to specify |
Yes but If I hide some item even with the selector (add :not() css property) it will not match the right active item after reload. There is a problem for sure. The active item after reload doesn't work if the element was hidden before to reload. Is there a way to refind the current item in the middle? |
Yeah, Sly can't account for that. I would have to implement a diffing engine... The answer is don't hide, but use add & remove methods. |
But your selector option finally do not do what is intended for. Reload doesn't take into account selector option. |
The whole Sly API is documented in docs folder. I won't tell you anything new. Selector option was hacked in when one of the guys requested it. It works, but there are issues. The preferred way how to manage elements is via add & remove methods. Both documented in the link above. |
Hello,
I use Sly with forcecentered itemNav and use activateMiddle and activeOn (click). It works fine but if I hide some elements (I know it's not recommanded), then the index of the active element (on the middle) is wrong. How can I modify this behaviour. Is there a way to only search prev/next index for item that don't have a certain css class?
I just need to know where I can find the code that retrieve the acitveMiddle index. I try with getIndex() but without success (because I can't know if the slider was slide left or right)...
Thank you.
lolo
The text was updated successfully, but these errors were encountered: