After pressing enter I would like that only the keyup
event be fired but blur
is fired first. How to cancel blur
when
I Couldn't alter class
attribute so i'd ended up with,
$(".textbox").on("blur",function () {
if($(this).attr('flag')!='1')
alert("blur Event fired");
});
$(".textbox").on("keyup",function (event) {
$(this).attr('flag','1');
if(event.keyCode == 13){ // Detect Enter
alert("KeyUp fired after pressing Enter");
}
$(this).attr('flag','0');
});