0
I got a badge that’s attribute son of a button, that way:
<button id="equipeum" class="btn btn-primary" type="button"><span id ="pontoum"class="badge"></span></button>
In this case the badge would be a child element of the button (correct me if I’m wrong), anyway, my problem is to be able to change the values of the two, because when the I change the value of the button
"equipeum" via JS, the child element badge
gets lost.
Actually I want to use the 2 elements, Button gets one value and Span who is his son gets another. Draw?
– Tiago Silveira
@Thiagosilveira, by value you mean the content of the element?
– LLeon
This @leoklaj, the button gets a name and the badge gets a numbering, only when I grab the button by the id, it ends up filling everything and I can’t change the contents of the badge.
– Tiago Silveira
$('button'). prepend('name here') and $('span'). text(1)
– LLeon
Perfect @leoklaj, edit the answer so I can take it for granted.
– Tiago Silveira