I am trying to move a Div by binding a variable to the transform section in the builder.
It will work if I just use “translateX(-970px)” but when I use a variable “translateX(string-variable)” it doesnt work.
Ive tried several things but i am stuck at this point.
"string" + [variable] + "string" - you need to use the concatenation pluses for both sides, think of it as a bike chain.
As for these ones, “translateX (${widthForMultiStepForm})” you almost got it right, but you need to use the special apostrophes as mentioned in the article to wrap your string.
That makes sense, but also does not work.
I think I need to take a break and go to the gym. Im feeling stupid lol.
the translateX (${widthForMultiStepForm}) that works…with the backticks that dont show here, but thats a bit more confusing for me to work the math out with. the first one makes a lot more sense if I wanted to add or remove things.
This is helping though, thank you
It probably doesn’t work because I saw that you already have the px there, so it would be translateX(100pxpx) these kinds of things indeed are solved faster in a video call. If you’d have some more complex issues, or just wanted to learn/understand something, I also do 1:1 coaching which works like a charm for these kind of “visual” cases.
there no px in the widthNumber, thats just a number. So “translateX(“ + [widthNumber] + “px)” should evaluate to 970px but it says “invalid or unexpected token”
Thanks for letting me know about the coaching. Ive been out of work since january. I was let go from blizzard along with 1900 others with no warning. So I’m not able to pay for anything until I find work or this app works out for me.