Open Facebook's sharer.php similarly twitter intents popup
Make your facebook sharer.php social links open the same way as Twitter's intent links.
var socialpopup = function( url, title, width, height ) {
var top = ( screen.height / 2 ) - ( height / 2 );
var left = ( screen.width / 2 ) - ( width / 2 );
return window.open( url, title, 'toolbar=no, location=no, directories=no, status=no, menubar=no, scrollbars=no, resizable=no, copyhistory=no, width=' + width + ', height=' + height + ', top=' + top + ', left=' + left );
};
jQuery("a[href^='https://www.facebook.com/sharer/sharer.php']").click(function( event ) {
event.preventDefault();
var url = jQuery(this).attr("href");
socialpopup( url, "Share on Facebook", 550, 520 );
});
Written by Kyle Hotchkiss
Related protips
Have a fresh tip? Share with Coderwall community!
Post
Post a tip
Best
#Javascript
Authors
Sponsored by #native_company# — Learn More
#native_title#
#native_desc#