 <p>You can use <strong><a href="http://api.jquery.com/attr/" rel="nofollow"><code>attr()</code></a></strong> with callback to update inline css</p> <p><div class="snippet" data-lang="js" data-hide="false"> <div class="snippet-code"> <pre class="snippet-code-js lang-js prettyprint-override"><code>$('#div1').attr('style', function(i, v) { return v.split(';') // split css value by `;` to get each property .filter(function(val) { // filtering values var str = $.trim(val.split(':')[1]); // getting property value and trimming to avoid spaces return !(str == 0 || str == 'none' || str == ''); // checking property value is 0, none or '' , based on this filtering is done }).join(';'); // joining splitted array and return back for updating style property });</code></pre> <pre class="snippet-code-html lang-html prettyprint-override"><code>&lt;script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.1/jquery.min.js"&gt;&lt;/script&gt; &lt;div id="div1" style="position: relative; font-size: 24px; left: 175px; width: 400px; height: 200px; top: 0; background-image: none; background-color: none; background-position: 50% 50%;"&gt;New Element&lt;/div&gt;</code></pre> </div> </div> </p>