-
AuthorPosts
-
July 24, 2021 at 6:22 pm #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.July 27, 2021 at 10:07 am #1312673Hey 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,
IsmaelJuly 27, 2021 at 4:48 pm #1312794Thank 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.July 27, 2021 at 4:55 pm #1312798 -
AuthorPosts
- The topic ‘Magnificent popup on button?’ is closed to new replies.
