Skip to content

Instantly share code, notes, and snippets.

@billhorsman
Created April 3, 2014 08:37
Show Gist options
  • Save billhorsman/9950652 to your computer and use it in GitHub Desktop.
Save billhorsman/9950652 to your computer and use it in GitHub Desktop.
Turbolinks and AddThis
<div id="social" class="addthis_toolbox addthis_default_style addthis_32x32_style">
<a class="addthis_button_preferred_1"></a>
<a class="addthis_button_preferred_2"></a>
</div>
jQuery ->
$.getScript "//s7.addthis.com/js/300/addthis_widget.js#pubid=ra-YOUR_KEY_HERE", ->
window.addthis.toolbox('#social')
# This ensures that jQuery is reinitialized after the page:change event
gem 'jquery-turbolinks'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment