shshaw/Splitting

Call Splitting() a second time

GavinRF opened this issue · 0 comments

Having the hardest time getting Splitting() to run a second time after text in the element has changed, even though all the elements are cleared.

Is there a way to clear all variables, reset the functions, and make Splitting forget that it once existed so it can exist again?

Here is a demo that I've been hacking on.
https://codepen.io/GavFior/pen/GRGLYOv?editors=0011

Steps to reproduce: Hit the (split) button and the string "jumping over the moon" gets split, add text to the input and the spans are removed as the original string is changed. Hit the "split" button again and there is no change.

Thanks in advance :)