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