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
Post a Comment