JSFiddle - React, Tailwind, and code Playground
by Ananth Arumugasamy
HTML
<img alt="book" id="book">
<table border="1">
<tr>
<td>sadad</td>
<td>jdajk</td>
</tr>
<tr>
<td>sadad</td>
<td>jdajk</td>
</tr>
<tr>
<td>sadad</td>
<td>jdajk</td>
</tr>
<tr>
<td>sadad</td>
<td>jdajk</td>
</tr>
</table>
<div>
<a href="http:google.com">google</a><br>
<a href="http:yahoo.com">yahoo</a><br>
<a href="http:wwe.com">wwe</a>
<p>hi how are you</p>
</div>
<a href="http:yahoo.com">yahoo</a>
<a href="http:wwe.com">wwe</a><br>
<p>hi how are you</p>
<div>
<input type="checkbox" value="check1">check1</input><br>
<input type="checkbox" value="check2">check2</input><br>
<input type="checkbox" value="check3">check3</input><br>
<input type="checkbox" value="check4">check4</input><br>
<input type="checkbox" value="check5">check5</input><br>
</div>
<div id="div1"></div>
JavaScript
$( "#book" )
.error(function() {
alert( "function called." )
}).attr("src","missing.png");
$("tr:odd").css("background-color","#ccffcc")
$("tr:even").click(function(){
$(this).css("background-color","red")});
$("div a + p").css("background-color","#ccffcc")
var countChecked = function() {
var n = $( "input:checked" ).length;
$( "#div1" ).text( n + (n === 1 ? " is" : " are") + " checked!" );
};
countChecked();
$( "input[type=checkbox]" ).on( "click", countChecked );