JSFiddle - React, Tailwind, and code Playground

by thomas4g

HTML

<div class="wrapper">
   <a href="#">blah</a>
   <div class="post">stuff</div>
</div>
<div class="wrapper">
   <a href="#">blah</a>
   <div class="post">stuff</div>
</div>
<div class="wrapper">
   <a href="#">blah</a>
   <div class="post">stuff</div>
</div>
<div class="wrapper">
   <a href="#">blah</a>
   <div class="post">stuff</div>
</div>

JavaScript

$(document).ready(function() {
    $(".post:even").css("background-color","blue"); 
    $(".post:odd").css("background-color","red"); 
});