<<script>>: bad evaluation: unexpected token var

FYI - You’ll need to put macro names within “preformatted text” markers to make them visible in this forum. You’ve missed that in a couple of other places as well, such as this one.

@KrypticKitty: You can use code like the following to do what Greyelf suggests:

<<script>>
$(document).one(":passagerender", function(ev) {
	var matrix = $(ev.content).find("#matrix")[0];
	(The rest of the code goes below...)
});
<</script>>

Hope that helps! :slight_smile: