Show or hide the element (not the 0% opacity)

Hi,there~
about 4 mouths ago, I find the same question in the hype desk, question here,it use the code like this:
Show:hypeDocument.getElementById(‘id’).style.display = 'block’;
Hide: hypeDocument.getElementById(‘id’).style.display = 'none’;

I’ve tride for many times, it works well, Today, I use the javascript again, but it doesn’t work, Why~~~~~?

Thank you all~~

Well, you’re using some strange quotations in the code you provided.
I am more of a fan with visibility options though if you still want the item to take up space on the page, check this file:
visibility.hype.zip (10.0 KB)

3 Likes

I agree with Mark, it looks like the quotation marks have been copy/pasted from a rich text editor (curly quotes, maybe). If you replace the quote marks while you are in Hype’s javascript editor window, all is well.

1 Like

Thanks Markus,

Now I know how to assign a class or id to an element via the identity tab.

Aloha

1 Like