JSFiddle - React, Tailwind, and code Playground

by mmis1000

HTML

<div id='wrap'></div>

CSS

.class1 {
    background : red;
}
.class2 {
    background : yellow;
}
.class3 {
    background : black;
}
input{
    width:10px;
    border:1px solid;
    margin:2px;
    padding:1px;
    background : white;
}

JavaScript

var i, count = 0, buttons;
for(i = 0; i < 8000; i++) {
    $('#wrap').append($('<input type="button"></input>'));
}
$('input').click(function(){
    var time = Date.now();
    count++;
    /$('#wrap').hide();*/
    $('input').toggleClass('class1');
    $('input').toggleClass('class2');
    $('input').toggleClass('class3');
    /*$('#wrap').show();*/
    alert(Date.now() - time)
})