• Resolved hihiar

    (@hihiar)


    can i add scrollbar Parameter like height=”xxx” on Different linking to Control the scrollbar, I try to design the popup.js but cannot work for me. following is the code, please hlep me to check

    jQuery(document).ready(function($) {

    $(‘.popup’).click(function() {

    var w = $(this).data(‘width’);
    var h = $(this).data(‘height’);
    var sb = $(this).data(‘scrollbars’);

    var left = (screen.width/2) – (w/2);
    var top = (screen.height/2) – (h/2);

    var NWin = window.open($(this).prop(‘href’),”,’scrollbars=’ + sb + ‘,width=’ + w + ‘,height=’ + h + ‘,top=’ + top + ‘,left=’ + left);

    if (window.focus)

    {
    NWin.focus();
    }

    return false;
    });
    });

    [popup url=http://www.abc.com height=”500″ scrollbars=”0″width=”515″]linking[/popup]

    https://wordpress.org/plugins/alligator-popup/

Viewing 4 replies - 1 through 4 (of 4 total)
  • Plugin Author cubecolour

    (@numeeja)

    I’m not sure I totally follow what you are trying to achieve. Are you trying to control by how much the window is scrolled when the popup window opens? If so I have no idea whether that is even possible and if it is I doubt that it would be something I would be inclined to spend time investigating.

    If the aim is to open the popup window so that a particular element is visible at the top, the best way to achieve this is to link to a named anchor in the target page.

    eg:

    In the target page

    <h2 id="openhere">Open the popup so this heading is visible</h2>

    the shortcode:

    [popup url=http://myawesomewp.site/targetpage#openhere height="500" width="460"]Link to popup[/popup]

    Plugin Author cubecolour

    (@numeeja)

    After rereading your question I think you might be asking about whether scrollbars could be enabled, but I’m still not sure.

    I have just updated the plugin to include a new scrollbars arg.

    From version 1.1.0 scrollbars will appear by default, but can be removed by adding a value of zero to the shortcode’s scrollbars arg:

    scrollbars='0'

    So the full shortcode would look something like:

    [popup url=http://myawesomewp.site/targetpage height="500" width="460" scrollbars="0"]Link to popup[/popup]

    Thread Starter hihiar

    (@hihiar)

    Yes, i want this, thank you

    Plugin Author cubecolour

    (@numeeja)

    You should be able to do this now once you’ve updated to the latest version of the plugin & added the parameter scrollbars="0" to your [popup] shortcode.

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Scrollbar removal by different link’ is closed to new replies.