JSFiddle - React, Tailwind, and code Playground

by Anand Rathod

HTML

<html>
<body>
    <div id="product_descriptioncontent">
      <input type="text" id="a" />
      <textarea id="b"></textarea>
    </div>
</body>
<html>

JavaScript

$('#product_descriptioncontent').children().each(function() {
    $(this).on('keyup', function() {
        if ($(this).data('c_val') != $(this).val()) {
            alert('value changed!');
            //do other stuff
        }
        $(this).data('c_val', $(this).val());
    }).data('c_val', $(this).val());
});