DEV Community

loading...

Discussion on: A JavaScript interview question asked at Facebook

Collapse
yairy profile image
Yair

This will only work if the element is absolute positioned.

Collapse
tomshaw profile image
Tom Shaw

Have you tried el.style.transform = "translate(x,y)"