Hi all,
I'm trying to follow the code to create a hidden link as set out in the Twine Cookbook but can't get it to work. I'm quite new to coding so it's possible I'm missing something obvious. The code provided in the cookbook is set out like this:
:: UserScript[script]
Hidden links that hide unless you're hovering over them:
<span class="hides">[[A hidden link]]</span>
*/
$('.hides')
.addClass('hidden')
.on('mouseenter', function () {
$(this).removeClass('hidden');
})
.on('mouseleave', function () {
$(this).addClass('hidden');
});
:: UserStylesheet[stylesheet]
.hidden a {
color: transparent;
}
I think I'm following the instructions correctly by putting the script part into the 'edit story javascript', the stylesheet into the 'edit story stylesheet' and the span class into the passage itself.
It's highly possible I'm getting myself confused and missing something obvious but any help would be greatly appreciated.
Many thanks!