Viewing 6 replies - 1 through 6 (of 6 total)
  • Plugin Author Jan-Peter

    (@starguide)

    That is the intended behavior.

    If you want a popup (like me) you can use the following code and put it in your footer:

    <!-- Shariff Popup -->
    <script>jQuery.noConflict(),jQuery(document).ready(function(e){e(".shariff a").click(function(n){n.preventDefault();var t=e(this).attr("href"),o=screen.width/2-275,r=screen.height/2-200;return window.open(t,"_blank","height=400, width=550, status=yes, toolbar=no, menubar=no, location=no, top="+r+", left="+o),!1})});</script>
    Plugin Author Jan-Peter

    (@starguide)

    Hi Nils,

    if you don’t mind, I would like to include your code directly in our plugin as an option. Could you change the code to exclude certain services? Currently it opens empty popups for print and mailto. Also mailform and info are probably better opened in a new tab, since you cannot read anything in that small popup.

    Cheers,
    JP

    Hey JP,

    Sure, you can use it. In order to exclude butons from opening in a popup just add

    .not("li.shariff-button.xxxxxxxxx a")

    where xxxxxxx is the css class name of the button you like to exclude.

    For example to exclude Facebook from opening in a popup, use:

    <!-- Shariff Popup -->
    <script>jQuery.noConflict(),jQuery(document).ready(function(e){e(".shariff a").not("li.shariff-button.facebook a").click(function(n){n.preventDefault();var t=e(this).attr("href"),o=screen.width/2-275,r=screen.height/2-200;return window.open(t,"_blank","height=400, width=550, status=yes, toolbar=no, menubar=no, location=no, top="+r+", left="+o),!1})});</script>

    To exclude more buttons use:

    <!-- Shariff Popup -->
    <script>jQuery.noConflict(),jQuery(document).ready(function(e){e(".shariff a").not("li.shariff-button.xxxxx-1 a").not("li.shariff-button.xxxxx-2 a").not("li.shariff-button.xxxxx-3 a").click(function(n){n.preventDefault();var t=e(this).attr("href"),o=screen.width/2-275,r=screen.height/2-200;return window.open(t,"_blank","height=400, width=550, status=yes, toolbar=no, menubar=no, location=no, top="+r+", left="+o),!1})});</script>

    Since I only use FB, G+, Twitter and reddit buttons, I did not need to exclude a service yet.

    Hope that helps.

    BR
    Nils

    • This reply was modified 8 years, 6 months ago by jackennils.
    Plugin Author Jan-Peter

    (@starguide)

    Hi,

    version 4.3.0 now includes a popup options. Thanks to Nils for the code. I used most of it and just rewrote parts in order for it to work without jQuery.

    Feel free to test it and let me know if you encounter any problems.

    Cheers,
    JP

    You’re welcome. The new version looks really good. Great work!

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘Popup not working’ is closed to new replies.