Add +25px relative to the previous?

Good morning. There is a table

<table>
<tbody>
the <tr>
<td></td>
<td></td>
<td></td>
<td></td>
<td></td>
</tr>
the <tr>
<td></td>
<td></td>
<td></td>
<td></td>
<td></td>
</tr>
the <tr>
<td></td>
<td></td>
<td></td>
<td></td>
<td></td>
</tr>
the <tr>
<td></td>
<td></td>
<td></td>
<td></td>
<td></td>
</tr>
</tbody>
</table>

It is necessary in every new line of a third cell to add +25px padding-left relative to the previous

How it can be implemented using jquery
June 27th 19 at 15:31
3 answers
June 27th 19 at 15:33
Solution
Not that it's just a task all third cell padding-left: 25px
and it is necessary that the first line of the 3 cell had padding-left: 25px
in the second line, 3 cell had already padding-left: 50px - demario.Durgan commented on June 27th 19 at 15:36
: https://jsfiddle.net/bad8wjub/2/ - noe commented on June 27th 19 at 15:39
June 27th 19 at 15:35
Create a buffer in the globe.region. To 'table tr' use the each method. In each look at this third cell. Plus to the buffer 25 and ask the third cell buffer value.
Just what is the difference that will set a different width cells in one column if they are all aligned at the widest?
the text moves to the right, and this is just what I need, And if not hard could you give an example - demario.Durgan commented on June 27th 19 at 15:38
June 27th 19 at 15:37
var td = $('td:nth-child(3n)');
var content = 'Lorem ipsum dolor sit amet,
consectetur adipisicing elit.
Maxime et?
';
for (var i = 0; i < td.length; i++) {
var newArr = content.split(/
/g);
var newContent = ";
for (var j = 0, ml = 25; j < newArr.length-1; j++, ml += 25) {
newArr[j] += '
';
newContent += newArr[j];
}
td[i].innerHTML = newContent;
}

Find more questions by tags jQueryJavaScript