Skip to content

Instantly share code, notes, and snippets.

@josephabrahams
Last active November 29, 2021 19:39
Show Gist options
  • Select an option

  • Save josephabrahams/9d023596b884e80e37e5 to your computer and use it in GitHub Desktop.

Select an option

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
Copy Markdown
Author

@the94air

Copy link
Copy Markdown

So nice and clean. Thanks!!

@ouelletv

ouelletv commented Aug 1, 2018

Copy link
Copy Markdown

@lenastm

lenastm commented Jun 7, 2019

Copy link
Copy Markdown

Thank you !!

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