Load social media share page in new window

// 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); });

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.