JSFiddle - React, Tailwind, and code Playground
by charaf11
HTML
<form action="#">
<input type="text" />
<input type="text" />
<textarea name="" id="" cols="30" rows="10"></textarea>
</form>
<div class="img-holder">blabla</div>
CSS
#dealerarea{
position:absolute;
width:100%;
height:96px;
top:15px;
}
#dealercards{
display: block;
margin:0 auto;width:200px;
}
.class1{
color:blue;
}
.class2{
color:red;
}
.class3{
color:green;
}
JavaScript
$('input,textarea').keyup( function(){
var count=0;
$.each($('input,textarea'),function(i,val){
if($(this).val()!='') count ++;
alert(count)
});
$('div.img-holder').addClass('class'+count);
} );