-
Notifications
You must be signed in to change notification settings - Fork 2.2k
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
Not working with semantic-ui? #188
Comments
ScrollReveal does not require jQuery. It looks like you are using the 3.0 release candidate, so you must call the window.sr = new scrollReveal();
sr.init();
// or chained
window.sr = new scrollReveal().init(); Check out the 3.0 pull request (#168) for more information and sample code. Sorry for any confusion, the documentation will be updated shortly to reflect the new changes! 🙇 |
Hi @jlmakes thanks for the reply. I can sr in console and see that it was uninitialized. I ran init() and that fixes it. I thought it was suppose to self-initialize. Maybe mentioning that we need to run init() in the docs would spare others a great deal of time. except for my Cheers! |
You’re right, and previous versions did automatically initialize on instantiation. The main reason is that with the new JavaScript API in 3.0, it’s necessary to separate the instantiation and initialization—simple example: // instantiate
window.sr = new scrollReveal();
// use JS API to configure reveals
sr.reveal( '.myClass', "enter top after 1s" );
// initialize
sr.init(); I’m working on updating the docs for 3.0 right now! 🙇 P.S. I need to think it through a bit more, but I suppose it’s possible ScrollReveal could initialize on instantiation like it did previously—but one would still need to initialize after using |
here's what I made with it Thanks for scrollReveal! |
@Maxhodges Awesome! It’s my pleasure. |
I tried everything I could think of, but can't get it to work in semantic-ui. Anyone have similar problems and any workarounds?
Do I need jquery? If so, what version? I'm using:
You can see my project source here:
https://github.com/white-rabbit-japan/wreHomePage/tree/feature/scrollReveal
Cheers! 🍻
The text was updated successfully, but these errors were encountered: