1
I have done to create an element ( a tag ) the following code:
var b = $('<div>').css('color','red');
This way up I will have a div with the red color text ok, now is the following.
I’m getting a STRING which contains all the tag code so:
var a = "<div style=\"text-overflow: ellipsis; overflow: hidden; padding-bottom: 2px; text-align: center; margin-top: 4px;\">47782</div>";
$(a).css('color','red'); //TENTATIVA DE ALTERAR A COR, MAS NÃO DA ERRO NEM FUNCIONA
However it is not changing, I can not create this tag as in the first snippet of code, because the content of this string is received dynamically in my script.
My question is whether there is how I saw jQuery make the modifications or I will have to do everything in hand by moving the whole string directly?
Thanks, it looks really good this way.
– SneepS NinjA