os9xgw
Last Updated: February 25, 2016
·
28.65K
· shekhardesigner
Pppp

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:

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

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