javascript - input blur doesn't get fired -
$('.newbill').find('input').focus(function(){ if($(this).hasclass('roomnumber')){ return false; }else{ $('.roomnumber').change(function(){ if($('.roomnumber').val() != null && $('.roomnumber').val() != ""){ roomnumberfocusout(".roomnumber"); }else{ getsystemmessage('please enter room number proceed.'); } }) } })
i use above code fire method if user changes focus out .roomnumber
input. check whether input on .roomnumber
element changed if not changed not fire function. doesn't fired when focus changed using mouse. instead if use tab go next element gets fired. can make function fire in mouse click on input.
you may use blur event of input http://api.jquery.com/blur/
Comments
Post a Comment