Is it possible with javascript to add an element to a class?
EX: Have a class:
.post_22 {color:red}
Until then it only has color, but when you click on a link:
<a onclick="minBox()">Seu Poste</a>
Would you like to add CLASS post_22 to another style?
I know you can use it with css()
, but on the screen there is setInterval
, which means that when it refreshes again it would remove the css()
that would be assigned to the class through css (), in which case direct attribution in the class would not be removed in the next setInterval
.
Remembering that the class post_22
el does not really exist in the css file, it can be post_1
, post_2
, post_3
.... this comes according to ID
on the server linked to post.
If on the server the ID
of the post: "Hello my friend." for "ID: 66" it generates class post_
and joins with ID post_66