1
I’m having trouble concatenating the elements below.
I have the variable valorID
which is used as id, in div, and I’m trying to insert it into id and valorPosicao
for the attribute left, of inline css.
However, I am unable to enter the information.
var valorID='meuID';
var valorPosicao=20;
$("body").prepend('<div id='+valorID+'style=position:absolute;left:'+valorPosicao+'px;'+'></div>');
There’s an extra '+' there at the end
– Victor Eyer