Different Layouts Not Loading JS

Hi -
I’m struggling a bit to understand why different layouts are not loading the javascript functions I’ve created. Everything works perfectly when I’m not using different layouts.

I see that once I implement different layouts “onSceneLoad” changes to “onLayoutLoad” and the same JS functions are listed. However, the functions are not being called on one of the smaller layouts. Very simple JS like hiding elements, playing a video etc. (The original larger layout works as expected).

Am I missing something basic?


sounds like you are working with ids to identify elements … those have to be unique and can not be the same on different layouts … just a guess so:)

1 Like

Ok, that is it.
I have A LOT of elements etc. and a number of projects to work on. Is there a recommended way to do this that might expedite things?

I’ve been using this JS by @stephen to make my projects responsive. Proportionally scaling a Tumult Hype document based on the browser width

In your opinion do you think it would be important to change over and use the built in Hype responsive features?

Thank you!

you could use class to identify elements on a scene/layout instead of ids …
the script does not take effect on inlinescripts working or not …

1 Like