JSFiddle - React, Tailwind, and code Playground
HTML
current total:
<input id="current_total" />
<br> total waste processed:
<input id="total_waste_processed" />
<br>
<button id="add_new_log">
check
</button>
JavaScript
$(document).ready(function() {
$("#add_new_log").click(function(event) {
var current_total = parseInt($("#current_total").val());
var total_waste_processed = parseInt($("#total_waste_processed").val());
if (current_total > total_waste_processed) {
alert("value surpassed");
}
});
});