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

Popular posts from this blog

java - nested exception is org.hibernate.exception.SQLGrammarException: could not extract ResultSet Hibernate+SpringMVC -

sql - Postgresql tables exists, but getting "relation does not exist" when querying -

asp.net mvc - breakpoint on javascript in CSHTML? -