Skip to content

Instantly share code, notes, and snippets.

@anareyna
Created December 3, 2013 23:13
Show Gist options
  • Save anareyna/7779437 to your computer and use it in GitHub Desktop.
Save anareyna/7779437 to your computer and use it in GitHub Desktop.
share scripts (works on ie8+)
<a href="javascript:;" onclick="window.open('https://www.facebook.com/sharer/sharer.php?u=' + encodeURIComponent(location.href), 'facebooksharedialog', 'width=626,height=436');return false;" title="Comparte en Facebook" class="fb facebookButton">Comparte en Facebook</a>
<a href="https://twitter.com/share" title="Comparte en Twitter" class="tw twitterButton" target="_blank">Comparte en Twitter</a>
<script>!function(d, s, id) {
var js, fjs = d.getElementsByTagName(s)[0];
if (!d.getElementById(id)) {
js = d.createElement(s);
js.id = id;
js.src = "https://platform.twitter.com/widgets.js";
fjs.parentNode.insertBefore(js, fjs);
}
}(document, "script", "twitter-wjs");</script>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment