jquery on input code example

Example 1: jquery on dom change

$("#someDiv").bind("DOMSubtreeModified", function() {
    alert("tree changed");
});

Example 2: jquery on input

$('input').on('input propertychange', ()=>{});

Example 3: jquery when you typing in input

$('input[name="noofppl"]').keyup(function(){
  console.log($(this).val());
});

Example 4: jquery value of input

$("#textInput").val() // To get value of element textInput

Example 5: jquery on element change

// On element change.
$('mydiv').bind('DOMSubtreeModified', function () {
  console.log('changed');
});

Example 6: manually set jquery text box

$(".formData").val("valuesgoeshere")