Skip to content

Instantly share code, notes, and snippets.

@chambaz
Created February 24, 2014 13:13
Show Gist options
  • Save chambaz/9188189 to your computer and use it in GitHub Desktop.
Save chambaz/9188189 to your computer and use it in GitHub Desktop.
Conditional Loading of Share Tools with ResponsiveComments - http://responsivecomments.com/
<ul class="share-tools" data-responsive-comment-media="(min-width: 48em)">
<!--
<li><div class="fb-like" data-href="http://www.digitalsurgeons.com" data-layout="box_count" data-action="like" data-show-faces="false" data-share="false"></div></li>
<li><a href="https://twitter.com/share" class="twitter-share-button" data-url="http://www.digitalsurgeons.com" data-count="vertical">Tweet</a></li>
<li><div class="g-plusone" data-size="tall"></div></li>-->
</ul>
document.querySelector('.share-tools').addEventListener('responsiveComment', function(e) {
twttr.widgets.load();
FB.init({status: true, cookie: true, xfbml: true});
gapi.plusone.render(this.querySelector('.g-plusone'));
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment