Skip to content

Instantly share code, notes, and snippets.

@piotrlewandowski
Forked from josephabrahams/socialSharePopups.js
Created September 27, 2017 07:44
Show Gist options
  • Select an option

  • Save piotrlewandowski/d14a505f386742a05a19e5c45d2a7912 to your computer and use it in GitHub Desktop.

Select an option

Save piotrlewandowski/d14a505f386742a05a19e5c45d2a7912 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);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment