JSFiddle - React, Tailwind, and code Playground

by surendraVsingh

HTML

<form action="">

    <input name="address" id="address" type="text" value="Address" />

<input name="reset" type="reset" value="Reset Form">


</form>

CSS

input[type=text]{ color:#999999;}
input[type=text]:focus{ color:#000;}

JavaScript

$('#address').focus(function(){
    $(this).val(''); 
    $(this).css('color', '#000'); 

});
$('input[type="reset"]').click(function(){

       $('#address').css('color', '#999'); 


});