JSFiddle - React, Tailwind, and code Playground

by Sergio Kagiema

HTML

<table class="table">
										<tr>
											<td></td>
											<td></td>
											<td></td>
											<td></td>	
											<td></td>
										</tr>
										<tr>
											<td></td>
											<td></td>
											<td></td>
											<td></td>	
											<td></td>
										</tr>
										<tr>
											<td></td>
											<td></td>
											<td></td>
											<td></td>	
											<td></td>
										</tr>																				
									</table>

CSS

.table{
    width: 100%;
    }
.table tr:nth-child(2n+1) {
    background-color:#f5f5f5;
}

JavaScript

$(function() {
				
				randomValues();
				//alert(1);
			});
			
			
		var randomValues = function(){
			var $td = $('.table').find('td');
			
			// each td has to have a different random value
			
			$td.each(function(){
      
				var $this = $(this);
        var random_values = Math.random() * 100 ;
        
				console.log($this);
				
				$this.html(random_values);
				
			});
					

		};