I want that when TAB key is pressed to execute my code and e.preventDefault();
. For testing I have checked the below events with only alert(9);
:
$().ready(function(){
$("div").delegate(".note","keydown",function(e){
//not working
});
$("div").delegate(".note","keypress",function(e){
//not working
});
$("div").delegate(".note","click",function(e){
//working fine
});
});
Only click event works while keypress and keydown doesn't work.