Quantcast
Channel: Help! with 2.0 - Twine Forum
Viewing all articles
Browse latest Browse all 1844

[Harlowe] Can I replace the contents of tw-sidebar using Javascript?

$
0
0
Hello everyone,

I wrote me a simple sidebar menu using javascript, which is toggled via a button and then slides in from the side. I already got it to work, but I would like to place the button that toggles the menu into the Harlowe sidebar and can't seem to get this to work.
I am new to javascript but I know that there is the possibility to call certain elements from a div-box or even the body and replace them with new strings. Would that also be possible with the tw-sidebar element?

To be clear: I want to replace the undo-redo-buttons or simply everyting in the tw-sidebar with my button that calls the sidebar to appear. If I place them in a passage, everything works fine already. I just want the button out of the way of the main content in the passages.

Viewing all articles
Browse latest Browse all 1844