How can I know which event caused a blur event in jQuery?
Blur event triggered using click or tab
etc. How can I know this blur event is due to click or tab
If you are trying to do two different things depending on which method was used, bind handlers to listen for .click() and .keyup(), then check for the keycode
var k = (window.event) ? event.keyCode : e.keyCode;
Or something on the order of this if you need
$(document).bind("click keyup", function(){
//check keycode
var e = (window.event);
var k = (e)?event.keyCode:e.keyCode;
if(k==9){
//tab code
}else if(e.type=='click'){
//click code
}
});