Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Harlowe 1.2.2 - Twine 2 Popups/Modal/Lightbox

I'd like to have highlighted words, which after being clicked, new information pops up as a modal/lightbox bubble. This information could be text, images, video, maybe even a sound file.

I've been studying JavaScript, Jquery, CSS and HTMl, and I'm having a hard time with Twine's syntax/logic. Arrays work differently, for example. So I'm wondering if anyone has already tried to create this pop-up/modal effect.

Thanks for your help!

Comments

  • Help! I created several scenes last night and they seem to have disappeared! What can I do???
  • fx1672 wrote: »
    I've been studying JavaScript, Jquery, CSS and HTMl, and I'm having a hard time with Twine's syntax/logic. Arrays work differently, for example.
    (emphasis mine) Twine is simply an IDE and compiler. Each story format defines it's own syntax. So, correctly, it's Harlowe's arrays that work differently—strictly speaking, that's not actually true, but that's a whole separate rabbit hole.

    Regardless. Like all story formats, Harlowe offers scripting support—in its case, via the Story JavaScript and the <script> tag—so you shouldn't have too much trouble either rolling your own solution or using an existing modal library—and there are a plethora from which to choose. As with most story formats, Harlowe does include jQuery by default, so a modal plugin for that would probably be the easiest thing you could do.

    A quick Google of "javascript simple jquery modal plugin" came back with several results, one of which was Featherlight.js—this is not an endorsement, I've never used it myself.
Sign In or Register to comment.