I have a table in which I print several data, but I want that in the cell, state, when waiting for it to be of one color, and to be approved, of another.
Try jQuery but at the moment it has not worked for me.
<!--
.estado1 {background-color : #ffff99; }
.estado2 {background-color : #00ffff; } -->
</style>
<table class="table table-responsive">
<tr class="success">
<th>No de Deposito</th>
<th>No de Comprobante</th>
<th>Monto</th>
<th>Banco</th>
<th>Tipo de Transacción</th>
<th>Fecha de Comprobante</th>
<th>Detalles</th>
<th>Observaciones</th>
<th>Fecha de Solicitud de Autorización</th>
<th>Estado</th>
<th>Fecha de Autorización</th>
</tr>
@foreach($depositos as $deposito)
<tr>
<td>{{ $deposito->id}}</td>
<td>{{ $deposito->noboleta}}</td>
<td>{{ $deposito->monto}}</td>
<td>{{ $deposito->banco->nombre}}</td>
<td>{{ $deposito->tipo->tipo}}</td>
<td>{{ $deposito->fechaboleta}}</td>
<td>{{ $deposito->detalles}}</td>
<td>{{ $deposito->observaciones}}</td>
<td>{{ $deposito->created_at}}</td>
<td>{{ $deposito->estado->estado}}</td>
<td>{{ $deposito->updated_at}}</td>
<td>
</td>
</tr>
@endforeach
</table>
<script src=”http://code.jquery.com/jquery-1.11.1.min.js” type=”text/javascript”></script>
<script type=”text/javascript>
$(document).ready(function() {
$('td:contains(“espera”)').addclass('estado1');
$('td:contains(“aprobado”)').addclass('estado2');
});