0
I’m creating a responsive table with vertical tabulation,
but I need to create a data-title=""
with the same value as the field(th).
I was able to create the data-title using the following js:
<script>
$('th').each(function() {
$(this).attr('data-title', $(this).data(''));
});
</script>
my table is like this already with the date-title :
<th id="C003" data-title="[object Object]">
<div id="apexir_C003" onclick="gReport.controls.widget(this.id)">Código</div></th>
I’d like to move on to the data-title the value of the div, in this example: "Code", would be possible?
Thanks for the tip, so he passed the whole line of th to the data-title. :
data-title="<div id="apexir_C003" onclick="gReport.controls.widget(this.id)" style="text-align:center;">Código</div>"
– Kim Hanneman
I forgot that your
th
had internal elements, I already edited the answer.– user136436
It worked! Thanks for the strength.
– Kim Hanneman
If the answer served you, accept it as an answer so that it remains as accepted by the site.
– LeAndrade