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++ - protocol buffers - generate NON-inline accessors -

c# - issue attaching/adding an entity object which is detached from the DB Context? -