<div><a id="link" style="position:fixed !important;
bottom:0px !important;
right:0px !important;
color:#000000 !important;font:10pt Arial !important">press me</a>
</div>
In order to change that div block into
<div><a id="link" style="position:fixed !important;
bottom:0px !important;
left:100px !important;
color:#000 !important;font:10pt Arial !important">press me</a>
</div>
(only the left property is different), I try this
- Remove all attributes of style
($'#link').RemoveAttr('style'); - I would like to add the attributes of style back but there seems to be none of such AddAttr exists.
You can use .attr(‘style’, ”) to remove, and .attr(‘style’, ‘…’); to set the style back.
But it might be better to set the css styles to two different classes and use .addClass() and .removeClass() instead.