trigger keyup event jquery code example

Example 1: trigger button click jquery

$("input").trigger("click");

Example 2: jquery trigger

$( "#foo" ).on( "click", function() {
  alert( $( this ).text() );
});
$( "#foo" ).trigger( "click" );

$( "#foo" ).on( "custom", function( event, param1, param2 ) {
  alert( param1 + "\n" + param2 );
});
$( "#foo").trigger( "custom", [ "Custom", "Event" ] );

Example 3: set value of attribute using each and keyup jquery

$('.EntryField').keyup(function() {
    $('.EntryField').each(function() {
        // do stuff
    });
 });

Example 4: jquery keyup

// Similar to KeyUp but just called on input change (optimal for AJAX calls)
  var input = $('#formID').find('input[type="text"]');
  input.on('input',
    function(){
      console.log (input.val());
    });