I'm using Twine 2.1.3 and SugarCube 2.18.0.
I have created a div-element as a pop-up window and am allowing the player to close this div element with an ondblclick Event:
How would I have to alter the code, if I also want to send the player to a specific passage upon double clicking the div element? I have found some topics talking about using JavaScript to jump to specific passages, but I can't seem to get this to work.
I have created a div-element as a pop-up window and am allowing the player to close this div element with an ondblclick Event:
<script> function closeThis() { document.getElementById("pop-up").style.visibility = "hidden"; } </script> <div id="pop-up" class="thumbs" ondblclick=closeThis()> - Double-click to close - </div>
How would I have to alter the code, if I also want to send the player to a specific passage upon double clicking the div element? I have found some topics talking about using JavaScript to jump to specific passages, but I can't seem to get this to work.