Last Updated: February 25, 2016
· shekhardesigner

Remove CSS properties from Inline styles using jQuery

In some context, we have to add few inline styles with JS. Later few scenarios will need only remove selected properties from that inline styles, not the entire style attribute.

In that case you can pass null value to your CSS key:value pair and all done. Example:

$(elm).css("margin", ""); //passing value as null.

Above value will remove the margin from inline style of elm in use.