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

ios - UICollectionView Self Sizing Cells with Auto Layout -

node.js - ldapjs - write after end error -

DOM Manipulation in Wordpress (and elsewhere) using php -