I have the following code that I thought would work, but nothing happens ...
$(document).on('click', '#tab-departamentos a', function(){
$('textarea').each(function(){
var a = (this.scrollHeight-12)/20;
//alert(a);
$(this).attr('rows', a);
})
var href = $(this).attr('href');
$(href).tab('show');
})
I did not post the fiddle because the code is small so I did not see any need.
This link here (# tab-departments a) serves to show the contents of a Bootstrap Tab (getbootstrap.com/javascript/#tabs) like ($ (href) .tab ('show')), which I can only edit the rows attribute of the main Tab, the others that are hidden and are dynamic elements are not changed ...