title: Twitter Share button dynamic URL share
body: <p>I'm trying to make a custom Twitter button that will grab the page URL of the current page when clicked, which would obviously change dependent on which page it appears on, not unlike the default share button. However, I am unsure how to pass the page URL into the button.</p>
  
  <p>This is what I have thus far <a href="http://jsfiddle.net/4jF5N/" rel="noreferrer">jsfiddle</a></p>
  
  <pre><code>&lt;style type="text/css" media="screen"&gt;
  
  &lt;/style&gt;
  &lt;div id="social-share-container"&gt;
  &lt;div id="custom-tweet-button"&gt;
   &lt;a id="tweetShare" href="https://twitter.com/share?url="+encodeURIComponent(document.URL); target="_blank"&gt;Tweet
      &lt;/a&gt;
  &lt;/div&gt;
  &lt;/div&gt;
  </code></pre>
  
  <p>It's a bit hacked together as I'm pretty unfamiliar  with JS.</p>