-
Notifications
You must be signed in to change notification settings - Fork 68
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
Destroy split #64
Comments
Hello, There isn't a method, but I have done it here: On the top banner when you hover over it - the text spans will remove after it has finished animating. We used a custom function:
Here's a demo where its working: The Splitting character spans are green and will go to white when they are removed. We adjusted our splitting output - so the function won't remove 100% of the html - but it should give you a start. |
I used this because I had trouble using splitting in combination with Highway JS, might be useful for you as well: const splitted = document.querySelectorAll('[data-splitting]')
if (splitted) {
splitted.forEach(split => {
split.innerHTML = split.innerText
})
} |
I've tried your method plus a bunch of different hacks to "destroy" Splitting. The issue is it never truly gets destroyed so it can't be recalled. I am trying to give user input a splitting style so the --word and --char count changes. Any ideas how I might get Splitting to run a second time? |
In case someone stumbles across this like I did, I figured it out. So something like this
|
Hello,
I'm using split and it works nicely.
However, I need to destroy it depending on an event (so remove all added html, css...) like if I didn't apply split at all to the element.
Is there any way to do that ?
Best regards,
The text was updated successfully, but these errors were encountered: