How can i remove background-image from element style. I don’t want to set it to none or 0. I want to remove it completely. it’s conflicting with moz-linear-gradient which is defined in another class.
<div style="background-image:url(http://domain.com/1.jpg); width:100px" class="mozgradient"></div>
Have you tried:
Setting the background to an empty string should remove the inline style such that class and other stylesheet settings take effect, but it shouldn’t affect other styles that were set inline like
width. (In this case removing it from all elements with themozgradientclass prevents the conflict you are talking about.)From the jQuery .css() doco: