How can I add an attribute into specific HTML tags in jQuery?( I dont want to overwrite )
I have it in HTML:
<td style="width: 30%">Hello</td>
style="width:30%" is important.
Now I'm using a function () and adding attr:
$(cell_above_old).attr('style', 'vertical-align : middle;text-align:center;');
But the style is overwritten:
<td style="vertical-align : middle;text-align:center;">
What I want is to add the line to the existing style.
<td style="width:30%;vertical-align : middle;text-align:center;">
There is some function to do this?, such as:
$().attr('addStyle','styles');