I have to resize the textArea tags of my page which have the class : textAreaGroup
First only two textArea tags are loaded then using ajax, I load the others.
I have this code:
jQuery(document).ready(function(){
var orig_h;
jQuery(".textAreaGroup").on("focus", function(){
orig_h=jQuery(this).height();
jQuery(this).height( jQuery(this)[0].scrollHeight );
}).on('blur', function(){
jQuery('.textAreaGroup').height(orig_h)
});
});
it works only with the two first textArea tags, and it s not applied for the new ones loaded via Ajax.
What should I do to make this code available for all the textArea tags?