Skip to content

Instantly share code, notes, and snippets.

@josephabrahams
Last active November 29, 2021 19:39
Show Gist options
  • Star 15 You must be signed in to star a gist
  • Fork 5 You must be signed in to fork a gist
  • Save josephabrahams/9d023596b884e80e37e5 to your computer and use it in GitHub Desktop.
Save josephabrahams/9d023596b884e80e37e5 to your computer and use it in GitHub Desktop.
Facebook & Twitter Share Popup Windows
(function($) {
$('.js-share-twitter-link').click(function(e) {
e.preventDefault();
var href = $(this).attr('href');
window.open(href, "Twitter", "height=285,width=550,resizable=1");
});
$('.js-share-facebook-link').click(function(e) {
e.preventDefault();
var href = $(this).attr('href');
window.open(href, "Facebook", "height=269,width=550,resizable=1");
});
})(jQuery);
@josephabrahams
Copy link
Author

@the94air
Copy link

So nice and clean. Thanks!!

@ouelletv
Copy link

ouelletv commented Aug 1, 2018

@lenastm
Copy link

lenastm commented Jun 7, 2019

Thank you !!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment