

The Code: // Define the element we wish to bind to. It can be attached to any element, but the event is only sent to the. The bind lives on the body of the document, so regardless of what elements are added, moved, removed and re-added, all descendants of body matching the selector specified will retain proper binding. The keyup event is sent to an element when the user releases a key on the keyboard.Tip: Use the event.which property to return which key was pressed. The keyup () method triggers the keyup event, or attaches a function to run when a keyup event occurs.


If you're ever dynamically generating page content or loading content through AJAX, the following example is really the way you should go: jQuery keyup () method triggers a keyup event or adds an event handler by attaching a function to be executed for the keyup event when any keyboard button is released. To trigger a click button on ENTER key, We can use any of the keyup (), keydown () and keypress () events of jQuery.
