JSFiddle - React, Tailwind, and code Playground

by Bhushan Kawadkar

HTML

<div id="cars">
  <input type="text" name="car_added[]" class="car" style="width:100px; height:200px;color:red;border: 1px solid green;"/>
</div>
<input type="button" value="Click Me" id="clickMe"/>

JavaScript

$(function(){
    $('#clickMe').click(function(){
        var car = $('#cars .car:first');
      var style = $(car).css();
      alert(style);
      style = style.replace('green','blue');
      $(car).css(style);
    });
});