Last active
August 29, 2015 14:00
-
-
Save lukeandersen/11371219 to your computer and use it in GitHub Desktop.
Stupidly simple social sharing buttons
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <div class="post-share"> | |
| <a class="icon-facebook-sign" href="https://www.facebook.com/sharer/sharer.php?u={PAGE URL}"></a> | |
| <a class="icon-twitter-sign" href="https://twitter.com/intent/tweet?url={PAGE URL}&text={PAGE TITLE}}via={SITE NAME}"></a> | |
| <a class="icon-pinterest-sign" href="http://pinterest.com/pin/create/button/?url={PAGE URL}&media={POST IMAGE URL}&description={PAGE TITLE}" title="Pin It"></a> | |
| <a class="icon-google-plus-sign" href="https://plus.google.com/share?url={PAGE URL}"></a> | |
| </div> | |
| <script> | |
| // requires jQuery | |
| $('.post-share a').each(function() { | |
| $(this).on('click', function(e) { | |
| e.preventDefault(), | |
| window.open(this.href,"targetWindow","toolbar=no,location=no,status=no,menubar=no,scrollbars=yes,resizable=yes,width=620,height=340").moveTo(0,300) | |
| }); | |
| }); | |
| </script> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment