Tweet button doesn't work on webpage


My Tweet button but does not appear correctly on my Tumblr blog when I have endless scroll enabled and the Tweet button is done via Javascript.
Every post on Page 1 is fine but when a post gets pushed to page 2 it no longer shows the Tweet button.
When I switch to iFrame it works fine.

<a href="" class="twitter-share-button" data-url="{ShortURL}" data-counturl="{Permalink}" data-count="horizontal" 
 data-text="check this out:" data-via="FOKUS" data-related="FOKUS" data-hashtags="fokus" data-lang="en">Tweet</a>

<script>!function(d,s,id){var js,fjs=d.getElementsByTagName(s)[0];if(!d.getElementById(id)){js=d.createElement(s);;js.src="//";fjs.parentNode.insertBefore(js,fjs);}}(document,"script","twitter-wjs");</script>


It’s probably that the DOM for the button on page2 does not exist when widgets.js executes (which creates the button). The iframe solution is pretty nice in this case, otherwise you’d have to run the appropriate javascript after the button is drawn.