// Social window popups
function windowPopup(url, width, height) {
var left = (screen.width / 2) - (width / 2),
top = (screen.height / 2) - (height / 2);
window.open(
url,
"",
"menubar=no,toolbar=no,resizable=yes,scrollbars=yes,width=" + width + ",height=" + height + ",top=" + top + ",left=" + left
);
}
// Click event
$(".js-social-share").on("click", function(e) {
e.preventDefault();
windowPopup($(this).attr("href"), 500, 300);
});
Create your own share button.
Taken from: https://jonsuh.com/blog/social-share-links/
Facebook
<a href=" https://www.facebook.com/sharer/sharer.php?u=https%3A%2F%2Fjonsuh.com%2F"target="_blank">Share on Facebook</a>
Twitter
<a href=" https://twitter.com/intent/tweet/?text=Visit%20my%20website&url=https%3A%2F%2Fjonsuh.com%2F&via=jonsuh&hashtags=web,development"target="_blank">Share on Twitter</a>
Taken from: https://jonsuh.com/blog/social-share-links/
<a href=" https://www.facebook.com/sharer/sharer.php?u=https%3A%2F%2Fjonsuh.com%2F"target="_blank">Share on Facebook</a>
<a href=" https://twitter.com/intent/tweet/?text=Visit%20my%20website&url=https%3A%2F%2Fjonsuh.com%2F&via=jonsuh&hashtags=web,development"target="_blank">Share on Twitter</a>
Be the first to comment
You can use [html][/html], [css][/css], [php][/php] and more to embed the code. Urls are automatically hyperlinked. Line breaks and paragraphs are automatically generated.