Call an element by classname

Hi everyone and sorry for my english.
I’m trying to use the method hypeDocument.getElementsByClassName and i don’t get any result. If I use the method hypeDocument.getElementById, the behavior is as expected. It’s possible to use this DOM javascript method in Hype?
Thank you.

Read this

for an explanation why this does not work.

But you will need to use the document scope instead of hypeDocument

2 Likes

Thank you so much!

1 Like

Here is also some information on selection of elements:

Tips & Tricks: Using querySelector instead of getElementById

3 Likes

I will try it.
Thank you very much!