Whenever I add inline css with jQuery, it will also change the inline css format that already exists. For example, if I have a background image without quotes in the url, and I add something like
$('.element').css('padding', '10px');
it reformatts the full inline css. (also, for example, background-color: #ffffff; transfers to β background-color: rgb(255,255,255);
Here is a small violin. https://jsfiddle.net/chickberger/ppas2zrh/1/
I assume this is just jQuery / javscript syntax that applies to inline styles. If this is the case, is there a chance to avoid this? My main problem is double quotes on the background image url.
source share