title: Randomly set image background using jQuery
body: <p>I have CSS that displays a full image covering the entire page.</p>
  
  <pre class="lang-css prettyprint-override"><code>#backgroundjake {
    display: block;
    margin: 0;
    background: #fff  fixed;
    background-position: top right;
    /*background-position: contain;*/
    background-size: cover;
    position: relative;
    z-index: 5;
    top: 0;
    background-repeat: no-repeat;
    background-image: url("images/bb7.jpg");
  }
  </code></pre>
  
  <p>I have been trying to understand jQuery for a while, I have these a script that simply doesnt produce results.</p>
  
  <pre><code>&lt;script src="//ajax.googleapis.com/ajax/libs/jquery/1.10.2/jquery.min.js" &gt;
  
   var images = new Array('images/bb1.jpg', 'images/bb2.jpg', 'images/bb3.jpg',    'images/bb4.jpg', 'images/bb5.jpg', 'images/bb6.jpg', 'images/bb7.jpg',     'images/bb8.jpg' );
    var num = Math.ceil( Math.random() * totalCount );
   $("#backgroundjake")).css('backgroundImage', 'url(' +images[num]+ ')');
  
  &lt;/script&gt;
  </code></pre>
  
  <p>I call the css class like this in the html:</p>
  
  <pre><code> &lt;div id= "backgroundjake"  name= "backgroundjake" &gt;
  </code></pre>