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

How can I send the player to a passage using an onclick Event?

$
0
0
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:
<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.

Viewing all articles
Browse latest Browse all 1844

Trending Articles