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

    Hi,
    I’ve been using your code for the magnificent popup; thanks for that (found it in someone else’s support issue). It works perfectly if I call it from a text box with
    <a class="open-popup-link" href="#booking-popup">Book Now</a>
    and having another text area that says
    <div id="booking-popup" class="white-popup mfp-hide">[ninja_form id=2]</div>

    BUT I would like to call the popup from a button on the same page rather than from a text area.

    I thought maybe I could do it by applying the class open-popup-link as a css class on the button under Advanced>Developer Settings and putting the #booking-popup anchor tag in a text area just above the button and loading the desired content there as in
    <div id="booking-popup" class="white-popup mfp-hide">[ninja_form id=2]</div>
    ) but that doesn’t appear to work.

    Is there a way to call this popup from a button rather than a text link? Otherwise I could style my text to look like a button but that adds a bunch of other complications…
    Thank you.

    #1312673

    Hey destserengeti,

    Thank you for the inquiry.

    Would you mind posting the URL of the page where you added the button with the open-popup-link class? You may need to adjust the magnific popup script a bit in order for this work to correctly. Try to replace the selector in the script with “.open-popup-link a” instead of just “.open-popup-link”.

    Best regards,
    Ismael

    #1312794

    Thank you, Ismael – that one change (to .open-popup-link a) did solve my problem. I knew it must be simple but like many things, it’s not simple until you know how to do it! Thanks so much.
    Go ahead and close this issue out.

    #1312798

    Hi,

    Glad Ismael could help!

    Let us know if you have any other questions and enjoy the rest of your day!

    Best regards,
    Yigit

Viewing 4 posts - 1 through 4 (of 4 total)
  • The topic ‘Magnificent popup on button?’ is closed to new replies.