title: Issues with dynamically changing Twitter Button url
body: <p>I built a very simple random quote generator.  A bunch of quotes are stored in an array and one is displayed at any given time due based on a variable that holds the current quote.  If a user clicks a button for a new quote, that variable changes and a new quote is displayed.</p>
  
  <p>I'm trying to add a Twitter button to my page that will populate the tweet with the current quote.  I used the Twitter for Websites Twitter Button instructions and went through the related material, but I still can't figure out what's going on.  Currently, it works fine for the first quote but the quote doesn't change in the Twitter URL when you click "new quote."</p>
  
  <p>The main logic is here:</p>
  
  <pre><code>function updateTwitterUrl () {
      var quote = encodeURIComponent(currentQuote);
      var url = "https://twitter.com/intent/tweet?text=" + quote;
      $(".twitter-share-button").attr("href", url);
  }
  </code></pre>
  
  <p>And everything else is here: <a href="https://jsfiddle.net/37szaqpr/" rel="nofollow">https://jsfiddle.net/37szaqpr/</a></p>