title: Jquery-ui slider returning a 'cannot read property "nodeName" of null'
body: <p>I have a javascript function which is returning the error <code>Uncaught TypeError: Cannot read property 'nodeName' of null</code>. After having a bit of a look around, I can't really find anything relevant to why this would be happening as I do not have any form validation at all. <br> 
  The weird thing is that it is rendering fine when I load it regularly in a browser, however it needs to be put into a cms. I'm using weebly, and it loads fine one the preview once the html is inputed initially but when published returns the error.</p>
  
  <p>Any ideas to what would be causing this? This is the first time I've encountered this error.</p>
  
  <p>My function is set up to a jquery-ui slider movement action, which is set up to move another hidden slider, which is then set up to change the text on screen.</p>
  
  <pre><code>    $(function() {
  $('#slider').slider({
      disabled: true,
      range: 'min',
      value: 2013,
      min: 1960,
      max: 2013,
      animate: true,
  
      change: function (event, ui) { //I am getting the error on this line
  
          $('#header').text('Year: ' + ui.value);
  
          xA = ui.value;
          //console.log(xA);
  
          slider2.setState({'highValue': ui.value});
          slider2.draw();
  
          setChartView();
  
      }
  }); 
  });
  </code></pre>