I want to manipulate the DOM based on a condition stored in story.state, however I'm having trouble finding the right point to do it.
This doesn't work, presumably because the HTML is injected after the page has finished loading. The only way I can do it so far is with a set timeout.
I've also seen this,
but that seems to trigger before the message div has loaded too.
$(document).on("ready", function() { $('.message').show(); });
This doesn't work, presumably because the HTML is injected after the page has finished loading. The only way I can do it so far is with a set timeout.
I've also seen this,
$(document).on("showpassage:after", function() { $('.message').show(); });
but that seems to trigger before the message div has loaded too.