title: Convert multiple background images to an Array Javascript
body: <p>In CSS3 we can apply multiple background images to an element. I want to convert those multiple images into an Array.</p>
  
  <pre><code>&lt;div style="background-image:url('dg.png'), linear-gradient(to left, rgb(178, 69, 146), rgb(241, 95, 121))"&gt; 
  &lt;/div&gt;
  </code></pre>
  
  <p>I tried in following way using Jquery</p>
  
  <pre><code>$("div").css("background-image").split(",")
  </code></pre>
  
  <p>unfortunately that doesn't work because linear gradient also has <code>,</code>'s. And I tried like this</p>
  
  <pre><code> $("div").css('background-image').split("'),")
  </code></pre>
  
  <p>Ok fine worked, but I think it is not reliable, is there any reliable solution for this. It should give the final output like an Array as shown below.</p>
  
  <pre><code> ["url('dg.png')",'linear-gradient(to left, rgb(178, 69, 146), rgb(241, 95, 121))']
  </code></pre>