Skip to content

Instantly share code, notes, and snippets.

@hs777it
Forked from josephabrahams/socialSharePopups.js
Created November 29, 2021 19:39
Show Gist options
  • Select an option

  • Save hs777it/619400863abde96395bedf6b232f353b to your computer and use it in GitHub Desktop.

Select an option

Save hs777it/619400863abde96395bedf6b232f353b 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