jquery - How do I integrate variable in strings (javascript) -
i trying this:
var newpositiononx = 400px; $(".element").css("transform", "translate(0,newpositiononx)");
thank you!
try this:
var newpositiononx = 400; $(".element").css("transform", "translate(0, " + newpositiononx + "px)");
Comments
Post a Comment