I have a textbox which keeps track of old data and verifies with new data on keyup event. But this works well for single field.
$(function() {
var content = $('#myContent').val();
$('#myContent').keyup(function() {
if ($('#myContent').val() != content) {
alert('Content has been changed');
}
});
});
<input type="text" id="myContent" class="field1">
Say if there are multiple fields with the same class then how can we track the old data and verify with new data?