-
Notifications
You must be signed in to change notification settings - Fork 161
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
Initial value #77
Comments
Sure, it can be achieved by limiting TheaterJS to the word you want to change. The following should work: <h1>I like to drink <span id="drink"></span>.</h1> theaterJS()
.addActor('drink')
.addScene('drink:coffee')
.addScene('drink:beer'); In this example, TheaterJS is only going to change the content of the span with the id "drink". |
Thanks for your reply. However I'm not sure if this answers my question? I'd like the actor This would be the starting point:
And when Does that make sense? Right now it seems a word has to be programmatically added to the scene before it can be erased. |
Yes, your example should work. You can initialize the markup with the value you want it to have initially. Are you having any trouble with it? |
You are right, |
Oh ok, I now understand what you're looking for 👍 I'm afraid that is not possible without playing with the library's internals. Could you tell me more about your use case? Are you trying to use TheaterJS with a server-side rendered application? Knowing more about the use case could help me come up with the proper solution. |
Is it possible to have an initial value? Let's say we start off with a sentence:
And then the word coffee gets erased and changed to beer.
The text was updated successfully, but these errors were encountered: