JSFiddle - React, Tailwind, and code Playground

by tr_santi

HTML

<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.1.1/jquery.min.js"></script>
<form class='request-form'>
  <input type='text'>
  <select>
  <option>1</option>
  <option>2</option>
  <option>3</option>
  </select>
  <label><input type="checkbox" name="not-completed" checked>Not Completed</label>
</form>

<div class='put-stuff-in-here'>

</div>

JavaScript

var i=0;

function changeFunction(elem) {
   	$(".put-stuff-in-here").append(i + "<br>");
   	i++;
}

$('.request-form input[type="checkbox"], .request-form select').change(function() {
    changeFunction($(this));
});

$('.request-form input[type="text"]').on('input', function() {
    changeFunction($(this));
});