Skip to content

Instantly share code, notes, and snippets.

@pritam3010
Forked from josephabrahams/socialSharePopups.js
Created July 24, 2021 12:38
Show Gist options
  • Save pritam3010/c125849bc82d7bd2f9034f3d0b2532c3 to your computer and use it in GitHub Desktop.
Save pritam3010/c125849bc82d7bd2f9034f3d0b2532c3 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