- $(document).ready(
- function () {
- $('body').keyup(function(event){
- console.log(event.which);
- if(event.which == 46){
- $('#delete').click();
- }
- });
- ( more bindings )
- });
But the event isn't working all the time. It stops working after I change to another window and come back to the browser window.