JQuery input field on change & onload – How to add a jquery eventlistener automatically to all form input fields? A function should be executed at the page initialization (onload) and input field changes.
Code
function calculate() { // yourcode } $(document).ready(calculate) $(":input").change( function() { console.log("input changed") calculate() });