How to get Google plus share in popup like Twitter?
Asked Answered
F

1

6

The Google+ icon automatically shares the page on HOVER, and doesn't require a click like the others. Is there anything that can be done about this, to require a click like the others [fb,twitter] and to load in a popup as happens with the Twitter share icons?

Fourthclass answered 10/5, 2012 at 10:57 Comment(0)
F
8

The JavaScript window.open method will open a new window. You can combine this technique with the share link to accomplish your goal. Here's an example of this technique lifted from the official docs. Just substitute your target url for http://example.com.

<a href="https://plus.google.com/share?url=http://example.com"
  onclick="javascript:window.open('http://example.com','',
  'menubar=no,toolbar=no,resizable=yes,scrollbars=yes,height=600,width=600');
  return false;">
  <img src="https://www.gstatic.com/images/icons/gplus-64.png" 
    alt="Share on Google+"/>
</a>
Fredericksburg answered 10/5, 2012 at 14:56 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.