title: jQuery - Change Background Image With Variable?
body: <p>I'm trying to add a CSS background image with jQuery but can't seem to figure out how.  I THINK I'm along the right lines but I'm not sure...</p>
  
  <pre><code>var bgImg = "http://www.domain.com/my-image.jpg";
  
  $('#myBanner').css("background", "url("+bgImg+");");
  </code></pre>
  
  <p>Here's a fiddle of it not working:
  <a href="http://jsfiddle.net/qLqvtkp3/" rel="nofollow">http://jsfiddle.net/qLqvtkp3/</a></p>
  
  <p>Any help would be great!!</p>