Quantcast
Channel: Twine Forum
Viewing all articles
Browse latest Browse all 3830

Sugarcube basic stuff "no elements matched the selector" ???

$
0
0
It bordered me a while.

I have a passage with only one single line
<span id="morning"> ... Waken up.</span> <<link "Wake up">><<addclass "#morning" "hiddenspan">><</link>>

.hiddenspan is a class defined in the story css, which I think is a non-factor.

When I test display loading only this page, I got this error.
... Waken up. Wake up
Error: <<addclass>>: no elements matched the selector "#morning"Error: macro <</link>> does not exist

I think it is pretty basic. Almost a straight copy and paste from the Macro Library.

It happens to link/button, with all replace, addclass, removeclass. I think for some reasons the span is not built before the addclass looking for the span-id. My question is ... WHY? It is basically the sample code from the macro library? Is there a setting somewhere I set wrong?

I can write postdisplay scripts... but I would be appreciated if someone solves the mystery for me.

Viewing all articles
Browse latest Browse all 3830

Trending Articles