Nope, totally did not figure out the problem.
I did realize that I was failing to distinguish between Squiffy's internal set of variables and JavaScript's, which became clear upon reviewing Squiffy's
attributes page. So I tried to put that information to work.
I managed to make some variables cross over:
var plain = squiffy.get("plain");
squiffy.set("jplain", plain);
Squiffy's Plain: {plain}
JavaScript's Plain: {jplain}
Both of these agree with each other, and agree with the links that set them to get to this page. So I can set them to true or false, and both Squiffy and JavaScript have access to this setting.
BUT! My newTheme function is still failing to pick up on any of this!
function newTheme(theme) {
var plain = squiffy.get(plain);
alert (plain);
if (!plain) {
document.getElementById('theme').setAttribute('href', theme);
}
}
It's not running at all, which I take to mean that there's an error in here that is preventing the entire script from functioning.
I tried it while Squiffy was the only thing messing with variables, and that didn't work. So I put in a direct call here, and that didn't work either.
I tried commenting out the document call there and adding the alert to see if it were getting the right variable, and even that isn't working.
It's like the thing refuses to interface with Squiffy's variables at all!
I am at an utter loss. I've spent several hours today going through beginner-level JavaScript lessons and it seems straightforward, pretty simple even, nothing particularly weird or hard to grasp. I will continue working my way through the lessons but... what the hell is going on here??