title: using jQuery to dynamicly reload or switch external js file
body: <p>I have a webpage where I have an external js file that animates some divs. I want to place a button on the page that reloads the js file from the start so it stops the function and starts from the beginning. 
  I tried giving the script tag the id "animation" and then using the following. </p>
  
  <pre><code>$(document).ready(function() {
  
  $(".button").click(function()
  {
  
      $("#animation").attr('src','map.js');
  
  });
  }
  );
  </code></pre>
  
  <p>Needless to say it did not work. Wondering how to do this correctly. </p>