1
I have the following structure.
<div id="cabecalho">
<span data-bind="attr: { id: solicitacao.numero}"></span>
<div>
where, request returns me a number from 1 to 10 i would like to add a class according to the number.
Example:
if( span == 1 )
{
$("cabecalho").children.addClass( "teste1" );
}
A question. Why don’t you direct it? In the class attribute you put the direct value instead of doing it later via Jquery?
– DiegoSantos