javascript - Trying to get jQuery to fire alert when textarea of a certain class focusout -


i trying alert id of textarea when focus out of textarea. either or if value changes inside textarea doesn't matter much. have read .live has depreciated , textarea doesn't have .focusout function. here have tried far

<textarea id="<?php echo $row->payid; ?>" class="someclass"> 

that html using

$("textarea").on('focusout','.someclass',function () { alert("hello"); }); 

and here jquery

any appreciated

you want use blur not focusout, so:

$("textarea").on('blur','.someclass',function () { alert("hello"); }); 

Comments

Popular posts from this blog

vb.net - Alternative to the T-SQL AS keyword -

php - MySQLi binding parameters in a prepared statement doesn't work unless inserted after "WHERE" -

ios - CFRelease causing crash in iPad application -