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

Popular posts from this blog

python - mat is not a numerical tuple : openCV error -

c# - MSAA finds controls UI Automation doesn't -

wordpress - .htaccess: RewriteRule: bad flag delimiters -