2
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');
})
the link #tab-departamentos a
serves to display the contents of a Tab do Bootstrap (thus: $(href).tab('show')
).
But I can only edit the attribute rows
of the main Tab, the others that are hidden and are dynamic elements are not changed.
Although you claimed the code is small, creating the fiddle would help the rest of people understand the full context of your problem.
– Romulo