Hi I’m very new to working with snowman and I’m hoping making this post could help solve my problem.
I’m basically using a header passage to load UI elements but when I move to another passage, it only displays the CSS and not the JS/JQuery that should display a variable.
Any help would be much appreciated!
::UserScript
//bunch of functions to create var PlayerClock
let _v = window.setup.variables
_v.PlayerClock= Clock(17,5,ClockFormat)
$(function(){
$("#display").html(_v.PlayerClock)
})
::UserStylesheet
#display {
position: fixed;
top: 0;
right: 0;
width: 150px;
height: 40px;
border: 5px solid #56b988;
font-size: 2vw;
text-align: center;
}
::Header
<script>
window.setup = window.setup || {};
window.setup.variables = {};
_v = window.setup.variables
$(function(){
$("#display").html(_v.PlayerClock)
})
</script>
<span id= display></span>
::Beginning
<%= window.story.render( "Header" ) %>
There's so many tasks I need to do but only so much time till my friends come over! What should I do?
[[Dust the cabinets|Event1]]
[[Vacuum the living (and bed) room|Event2]]
::Event1
<%= window.story.render( "Header" ) %>
The dusting is done now. What else should I do?
[[Vacuum the living (and bed) room|Event2]]
::Event2
<%= window.story.render( "Header" ) %>
The house is vacuumed. What else should I do?
[[Dust the cabinets|Event1]]