I have been working on this for almost a day now and cant figure out how to make addthis work wtih turbolinks and rails 4. my add this code is
<script type="text/javascript" src="//s7.addthis.com/js/300/addthis_widget.js"></script>
<script type="text/javascript">
addthis.layers({
'theme' : 'transparent',
'share' : {
'position' : 'left',
'numPreferredServices' : 6
},
'follow' : {
'services' : [
{'service': 'facebook', 'id': 'blanckdigital'},
{'service': 'twitter', 'id': 'blanckdigital'}
]
},
'whatsnext' : {},
'recommended' : {}
});
</script>
<!-- AddThis Smart Layers END -->
How can i make it compatible with turbolinks so that it appears on every page without doing a page reload or disabling turbolinks
i finally got it to work with this