title: Uncaught SyntaxError in JS and possibly Wordpress
body: <p>I'm not too sure why my code is causing this.</p>
  
  <p>I have this jquery script in the header:</p>
  
  <pre><code>&lt;script&gt;
    $(document).ready(function() {
        $('.control').on('click', function(e) {
            e.preventDefault();
            var field = $(this).data('field');
            $('.hider:visible').fadeOut("slow", function() {
                $('#' + field + '-gallery, #' + field + '-tag').fadeIn("slow");
            });
        });
  
        var randomIndex = Math.floor((Math.random() * 100) + 1) % 3;
        console.log(randomIndex);
  
        var field = $($('a').get(randomIndex)).data('field');
        $('#' + field + '-gallery, #' + field + '-tag').fadeIn("slow");
    })​;
     &lt;/script&gt;
  </code></pre>
  
  <p>when I reload the page, nothing happens so it appears the script isn't running.  When I inspect the page on Chrome, I see there is this error which is in a tab called (program) and it's in the first few lines line:</p>
  
  <pre><code>    if (window.top.require) {
  Uncaught SyntaxError: Unexpected token ILLEGAL
      window.top.require("ripple/bootstrap").inject(window, document);}
  </code></pre>
  
  <p>I don't know what it is in my code to cause this error.  When I take out my script, it goes away.  Not too sure if it's something with wordpress or jqueryUI (I have that loaded for another plugin).</p>