Exporting hidden elements

I just noticed that the documentation says that hidden elements are not exported, which would impact some things I’m doing. Yet, when I export my app and run the HTML, the hidden elements seem to be there (my JS shows them when needed). Could you clarify please?
Thanks very much.

Hidden objects can be shown or hidden after an export. I’ve not seen any information that it won’t be exported, where did you read that? Here is an example on how to trigger hidden elements with javascript:

Edited the code after Daniels comment:

document.getElementById("yourElement").style.display = "block";

Thanks, Markus. I’ve been showing hidden element via JS in my previews, but was concerned when I read that they wouldn’t be exported.
To see this, go to Tumult.comhttp://Tumult.com, click on Elements, under Tumult Hype Documentation, then select Hiding and Locking Elements. There it says:

Locked elements cannot be selected or moved on the scene, and their properties cannot be changed in the inspector.
Hidden elements are not visible on the scene and are also not exported.

So, I wondered if there were conditions under which hidden elements would not be exported.

That is really strange. Instead, they should explain it something like this:

 "all elements that are hidden will stay hidden even after exporting, but can be triggered to be visible with a simple javascript".

@Daniel what’s your thought on this?

My understanding was that elements that have visibility off in the timeline will not be exported at all and cannot be shown with CSS or JS, but it looks like they can be shown by running:

document.getElementById("box").style.display = "block";

They have the property set to display:none; if they are hidden on the scene.

Yea, that is a feature which you should not remove Daniel :slight_smile: I’ve used it in older projects since I experienced a better perfomance in the browser when setting elements to hidden in the start.

1 Like

I also use this feature for language switching in all my projects and hope it will not be removed…

If you hide an element then export the project, you can use Hype's "Restore Document from Export" and the element will be in the restored Hype file (still hidden). From there you can un-hide the element.

it’s also new to me. nice oportunities though :slight_smile:

Indeed it is. No need to move objects outside the page, instead add a function which triggers its visibility on and off :slight_smile: