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

resetting data-midnight values via javascript #19

Open
benbonnet opened this issue Oct 7, 2014 · 2 comments
Open

resetting data-midnight values via javascript #19

benbonnet opened this issue Oct 7, 2014 · 2 comments

Comments

@benbonnet
Copy link

— not a bug/issue —

Let's say for example in a single section, you have a fullscreen horizontal slideshow, and that depending on which slide is the current, you'd want to have a different class on your fixed-midnight-header (first slide i ant the blue header, second slide i want the white one, etc…)

I was then wondering if something like "refreshing" the data-midnights values via javascript would be possible ? Or if it was somehow available

In another approach, can it be triggered somehow via javascript ? Somehow like switching the midnight-header via some javascript command without scrolling

@benbonnet benbonnet changed the title resetting data midnight values via javascript resetting data-midnight values via javascript Oct 7, 2014
@RobertoGonzalez
Copy link
Member

@bbnnt This seems like a good idea for massive sliders (adding a horizontal effect as well as the vertical one).
Right now there's no way of switching the class nicely in that specific case. While a command to recalculate all sections could be added to the API, we'd need to rework the plugin to make it actually look good (with appropriate animations and almost no lag).

I'm keeping this as a potential enhancement. Thanks for the suggestion!

@benbonnet
Copy link
Author

Like adding data-midnight to the divs contained in the main one, that would affect the menu

But you got the idea! I was not sure to make it clear.

Tried to play around in the console (changing the data-midnight manually, then re-firing some $("my class").midnight() ) with no success (: )
I'll stay tuned for this one !
thx for your answer

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

No branches or pull requests

2 participants