1

I am working on a social share button. Look up here

If click on "SHARE THE GOODNESS" a modal pop up is generated

I am trying to do that once the modal pop up is generated if i click on one of the Social media button to share the page i get a new smaller window inside the same page and not in a new tab.

In other words, i want to achieve the same i am achieving in the page if i click in the other button blu example "CLICK HERE".

Here the script i have used for the button "CLICK HERE"

        <script>        
        $('#openfacebookwindow').click(function(ev){
            window.open('http://www.facebook.com/sharer.php?u=http://yourwebsite.com','Title','width=200,height=400');
            ev.preventDefault();
            return false;
        });
    </script>

If i apply the same technique in the modal popup, it does not work, My question is, is it technically possible to do the same in the Modal pop up? If yes, how i have to work it out

Thanks

Koala7
  • 1,340
  • 7
  • 41
  • 83
  • I have noticed that in http://grooveshark.com/ when you share a song, it does exactly what i want to achieve, first it opens a modal pop up and after that when you select the Social network, it opens a new smaller window inside. – Koala7 Dec 15 '12 at 10:47

1 Answers1

0

I see that #Manna got the solution:

    function popitup(url) {
        newwindow=window.open(url,'name','height=400,width=500');
        if (window.focus) {newwindow.focus()}
        return false;
    }

<a href="https://plus.google.com/share?url={URL}" class="google" onclick="return popitup(this.href)">Google +</a>
hugomosh
  • 402
  • 6
  • 15