Viewing 9 posts - 1 through 9 (of 9 total)
  • Author
    Posts
  • #1450227

    All I need is a way to click on a text link, and have a floating window with content pop up. And then close when you click the “X” at the top. And ideas on how to do this?

    I saw this on https://momcozy.com/checkout at the bottom left. There are “link texts” that when you click on one like “Refund Policy”, a window with text info pops up and then you can click it closed.

    Thanks!

    #1450418
    #1450584

    Thanks but These links don’t show any examples at all. I don’t need an image or lightbox popup. I just need when you click on a text link, a window pops up with a page full of text, and then an “X” at the top right to close it. Any ideas on this?

    • This reply was modified 6 months, 1 week ago by bemodesign.
    #1450609

    Hi,
    To me your example page the popup:
    Enfold Support 6089
    is the same as our lightbox popup examples, I think this solution would be the best one to follow, it uses buttons but with a minor adjustment it could use plan text links, you can see that the popup has the “X” to close, in the screenshot there is only two words, but you can add as much text as you like:
    2022 01 27 004
    In your example page there are five links and popups:
    Enfold Support 6091
    Are you going to use this in the same way? If so how many popups do you want to use?

    Best regards,
    Mike

    #1450787

    Hi,
    This is an example with using text elements to hold the text for each popup and the script in a code block element that automatically numbers each box and link so you can add as many popup boxes as you wish. The boxes and links are number from the top down so the first link on the page will open the first box on the page.
    For this example this is how the backend looks:
    Enfold Support 6099
    you can add the text elements anywhere on your page, top or bottom it doesn’t matter because they will not show on the frontend.
    Each text element will have the custom classes: multi-popup mfp-hide
    Enfold Support 6101
    notice that the classes have no dots and the space between them.
    Then in your code block element add this code:

    <script>
    window.addEventListener('DOMContentLoaded', function() {
      (function($) {
        function assignUniqueIDs() {
          $('.multi-popup').each(function(index) {
            var uniqueID = 'multi-popup-' + (index + 1);
            $(this).attr('id', uniqueID);
          });
          
          $('.multi-popup-link').each(function(index) {
            var uniqueID = 'multi-popup-' + (index + 1);
            $(this).attr('href', '#' + uniqueID);
          });
        }
    
        assignUniqueIDs();
    
        $('.multi-popup-link').magnificPopup({
          type: 'inline',
          midClick: true
        });
      })(jQuery);
    });
    </script>
    
    <style>
    .multi-popup {
      position: relative;
      background: #FFF;
      padding: 20px;
      width: auto;
      max-width: 500px;
      margin: 20px auto;
    }
    </style>
    
    
    <a class="multi-popup-link" href="#">Link to box one</a></br>
    <a class="multi-popup-link" href="#">Link to box two</a></br>
    <a class="multi-popup-link" href="#">Link to box three</a></br>
    <a class="multi-popup-link" href="#">Link to box four</a></br>

    Please ensure to copy the code from the forum and not an email notification so the symbols are not converted.
    notice the four links at the bottom, you can add these in a different element if you wish, this is to show you the custom class that the links must have.
    Enfold Support 6097
    then on the frontend when you click a link the popup box will show:
    Enfold Support 6105

    Best regards,
    Mike

    #1451894

    Ok thanks but there is a popup on the home page now, right over the main page. How did this get there and can you remove this?

    #1451905

    Hi,
    We would need to see how you are using this, and where you want to use this. Perhaps you added it to your footer and now it is on all of your pages?
    Please include an admin login in the Private Content area and explain were you want this to show show we can examine. Then example that I show only works on the page with the code block, but I added it to the page and not the footer or widget.

    Best regards,
    Mike

    #1451998

    worked great and great instructions. Thanks!!!!!

    #1452007

    Hi,
    Glad we were able to help, if you have any further questions please create a new thread and we will gladly try to help you. Thank you for using Enfold.

    Best regards,
    Mike

Viewing 9 posts - 1 through 9 (of 9 total)
  • The topic ‘Floating text window, with Close option’ is closed to new replies.