I have a simple example where i have an input
field and i put a blur
and change
event on it:
HTML
<
Solved issue by this..
$('input').change(function(e){
alert('change');
e.stopImmediatePropagation();
$(this).off("blur");
});
$('input').focus(function(e){
$(this).on("blur", function(e){
e.stopImmediatePropagation();
e.preventDefault();
alert('blur'); });
});
you can use
this.unbind('blur');
on the onchange call
use .off
DEMO
$('input').change(function(e){
alert('change');
e.stopImmediatePropagation();
$(this).off("blur"); //$("input[name='test']").off("blur");
});
$('input').blur(function(e){
e.preventDefault();
alert('blur');
});
If I understand you correctly the answer is to use event.preventDefault();
See http://jsbin.com/welcome/52201/edit for a demo.