Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #1410151

    Hi, i use this solution for a popup window from another post:

    Hey axelfx07!

    Thank you for using Enfold.

    The Enfold uses MagnificPopup as default lightbox plugin. You can add this on functions.php:

    function popup_inline() { ?>
    <script type=”text/javascript”>
    jQuery(window).load(function(){
    jQuery(‘.open-popup-link’).magnificPopup({
    type:’inline’,
    midClick: true // Allow opening popup on middle mouse click. Always set it to true if you don’t provide alternative source in href.
    });
    });
    </script>
    <?php }

    add_action(‘wp_head’, ‘popup_inline’);
    Then use this on a text block:

    <div id=”test-popup” class=”white-popup mfp-hide”>
    <p>PLACE CONTENT HERE</p>
    </div>

    Show inline popup
    Add this on Quick CSS or custom.css:

    .white-popup {
    position: relative;
    background: #FFF;
    padding: 20px;
    width: auto;
    max-width: 500px;
    margin: 20px auto;
    }
    Remove browser cache then reload the page a few times.

    Cheers!
    Ismael

    It works great, but on my mobile it scrolls automatically to the top on the page and the content of the popup doesn’t shown.

    Script is on “360° Tour” button on the bottom of the sidebar. Link ist in private content.

    May anybody have a solution to position it on the top of the mobile.

    Thank you for helping!

    #1410190

    Hey Stefan,
    Try adjusting your script to include the overflow callback from this solution to prevent the page from scrolling with magnificPopup lightbox popup.
    Enfold_Support_2302.jpeg

    Best regards,
    Mike

    #1410342

    Hi, this doesn’t work.

    Now i have no popup but it scrolls back on top after klick on button

    #1410368

    Hi,
    Please include an admin login in the Private Content area so we can take a look.

    Best regards,
    Mike

Viewing 4 posts - 1 through 4 (of 4 total)
  • You must be logged in to reply to this topic.