title: error log for changing background image script, Google Chrome
body: <p>I'm having trouble getting my background-changing script to work in Google Chrome. I'm developing a custom WordPress theme, I've used the following jQuery, and it doesn't seem to do anything except for add my first class in. When I inspect element and look at the source, it's throwing the error "Uncaught TypeError: Cannot read property 'slice' of undefined", with a little red number that keeps going up next to it. Obviously it's running the code and that's what the red number keeps going up every two seconds for. Any ideas why this isn't working?</p>
  
  <pre><code>jQuery(document).ready(function() {
  jQuery(".background").addClass("foo image-1 bar");
  
  setInterval(function() {
    jQuery("body").toggleClass(function(index, className) {
      var s = className.split("image-")[1];
       var n = s.slice(0, 1);
      return "image-" + n + " image-" + (n &gt; 3 ? 1 : ++n);
    });
  }, 2000); });
  </code></pre>
  
  <p>Also, this code works fine in JSFiddle. So I know the code is good.</p>