Hey all! I've been working on making a tutorial in Twine, and I'm trying to get it so that when you push a button on the side bar, you can hide/ reveal information in the main body of the page. I've gotten all this set up using passage() links and setting booleans, but this has the annoying effect of scrolling to the top (and also reloading the whole page). I'd like to maintain scroll height, if possible.
I was looking at didn't seem to handle replacing text on another passage, or even at another spot on the same passage.
Example text of what I'm trying to accomplish below. I want to make it so that clicking the [ ] or [x] won't make the game scroll to the top. (For the example, add a bunch of line breaks at the top to simulate lots of other, bigger, examples.)
<span class="fancytext">Some Basic Commands</span>
<<if $CPermVar is true>>[[<html>[x]</html>|passage()][$CPermVar = false]]<<else>>[[<html>[ ]</html>|passage()][$CPermVar = true]]<<endif>> *create (Create a permanent variable)
<div class = "exampletext">
<<if $CPermVar is true>>
*create Spooky false
This creates the variable Spooky and sets it false. The create command must be used in the scene "setup".
Thanks so much! And I'm using Twine 1.4.2 Sugarcane.