[SOLVED] Backticks for Javascript not working in Code Element?

Bricks Version: 1.4.0.2
Browser: Firefox
OS: Windows

Unable to make something like this work:

element.style.transform = `translate(${current}deg)`;

Hello @khan360

I just tried code similar to yours, inside of a code element, and for me, it works.

Please re-check the code and if it is still not working, maybe you would need to provide more details about the context.

Thank you
Luis

1 Like

translate() needs 2 parameters in CSS. Or change to translateX or translateY that only need one. Or maybe rotate since you’re using deg?

2 Likes

Yeah my bad, how can I forget. Has to be it. Thank you very much.

1 Like

It’s working now. I overlooked a silly thing which was to use 2 arguments inside ‘translate’. You may please label this as solved or remove altogether.