개발

[jQuery] event

팥빙구 2015. 1. 7. 17:11

$(document).keypress(function(event) {

  if(event.which === 109) {

    $('.dropdown-menu').toggle();

  }

});


Triggering a keypress event handler when any key is typed isn't particularly useful. For more control, we can use the event object.

The event object contains more information about an event, such as which mouse button was clicked or which key was pressed.