title: JS Slider with demo failing with no apparent error?
body: <p>I have built (or am trying to build) a responsive slider but I am seeing something strange i.e nothing working? The console tells me there is an unexpected token on line 55 which is the first line of the following:</p>
  
  <pre><code>$.each($slides.function(index){
          // Create a button element for the button
          var $button = $('&lt;button type="button" class="slide-btn"&gt;&amp;bull;&lt;/button&gt;');
          if (index === currentIndex) {
              $button.addClass('active');
          }
          $button.on('click', function(){
              move(index);
          }).appendTo('.slide-buttons');
          buttonArray.push($button);
      });
  </code></pre>
  
  <p>Line 55 is stating that that the invalid token s the <code>{</code> after the <code>function(index)</code> I have created a demo which is all of the code I have put together thus far. I am wondering if somebody could cast an eye on why this isn't building out and why I am getting this error as I have counted the parenthesis and curly braces?</p>
  
  <p><a href="https://jsfiddle.net/evLLwwg8/" rel="nofollow">Demo of the slider build</a></p>