Why isn't my JavaScript responding the way it does on jsfiddle?

I’ve been learning more about JavaScript and Xibo since this thread, and I’ve got my code working more or less the way I’d like in this fiddle. (I suspect that I can get options.originalHeight and use that instead of a literal 400, but 400 works well for this demonstration.)

When I put that code into the ticker’s Optional JavaScript, though, nothing happens, either in the preview or on the Windows display client. I’ve also tried wrapping it in function EmbedInit() { } and that doesn’t do anything either. Where am I going wrong in translating a working fiddle to using it in Xibo?

I believe your code should work in embedded html (just as it does in fiddle), but in ticker I don’t think you have those div’s etc on which you can make js operations unless you’ve edited the template source code as well?

Ah. I thought I saw them in the preview, but I’ll examine the ticker template.

OK, I figured it out. Here’s the solution.