Howdy, Stranger!

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

jquery typed.js disables links

Working in Sugarcube 2, and have managed to get typed.js to function in the way I want, but one of the typed elements is the link to the next passage and while it visually behaves like a link clicking on it has no effect. Is there a way I'm missing to have the link appear through the typed.js effect and still function or does the javascript break link macros? I'm not sure if I'm overlooking something.

Comments

  • Are you using the typed.js integration module from the SugarCube 2 website or did you integrate typed.js yourself?
    Knowing this will help anyone that tries to debug your issue.
  • Let me take a look….

    Typed.js does not currently seem suitable for anything with attached event handlers. So, yes, it will break all passage links (regardless of the source: wiki links, <a data-passage></a> links, macro links).
  • Your best bet is to put links after the text with a suitable delay and then fade them in. So the typed text happens, then the link fades in at the end of the sentence.

    Alternatively you could do the typed passage with no links, then have a goto macro that moves onto a new passage of the same text with links, and have a nice fade in effect on all the text, so it types it out, then flashes again to include the link.
Sign In or Register to comment.