javascript - Get focus textarea id after click -


i need obtain textarea id focused when clicked element.

i use $(':input:focus').attr('id'), after click textarea looses focus immideatly , cann't obtain id of textarea selected.

could help?

you can use .focusout() method:

$('#focuseditem').focusout(function() {   var id = $(this).attr('id'); }); 

Comments

Popular posts from this blog

c++ - Creating new partition disk winapi -

Android Prevent Bluetooth Pairing Dialog -

VBA function to include CDATA -