title: ReferenceError: not defined
body: <p>So I have this function that is supposed make some changes to an image (for a portfolio I'm making) and there is a button to change the image and there is also a timer that runs that changes the image every six seconds, however, as much as the button works 100% the  timer does not, my firefox console tells me this: ReferenceError: nextone is not defined yet it is... What might be causing this?</p>
  
  <p>My Script:</p>
  
  <pre><code> function nextone() {
  $("#portfolio1").fadeOut(500, function() {
      nextinline += 1;
      if(nextinline &gt; jpgss) { nextinline = 1; }      
      $("#portfolio1").attr("src","images/portfolio/" + nextinline + ".jpg")
      $("#hyperlink").attr("href","portfolio.php?e=" + nextinline + "")
      $("#portfolio1").fadeIn(500);
      });
  }
  var timerr = setInterval("nextone()",6000); // Error Given on this line
  </code></pre>