-
AuthorPosts
-
August 30, 2017 at 2:41 am #845546
Refering to this post here
https://kriesi.at/support/topic/contact-form-in-pop-up-prettyphoto-issue/#post-304173I got this to work however if I wanted to have 3 different links opening their own text popup, what would I need to change..
Added code below for others to follow..
--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> <a class="open-popup-link" href="#test-popup">Show inline popup</a> --Then 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.
- This topic was modified 7 years, 3 months ago by wealthyone.
August 30, 2017 at 2:51 am #845549Ok I think I worked it out.
I changed the id=”test-popup” to id=”my-popup”
And
href=”#test-popup” to href=”#my-popup”
on the 2nd ( and 3rd I changed again) to make the 2nd and 3rd pop ups workis this all that is needed??
- This reply was modified 7 years, 3 months ago by wealthyone.
August 30, 2017 at 5:12 am #845567Hi!
Hmm… The original
id="test-popup"
andhref="#test-popup"
should have worked. But please remember that you cannot have two elements having the same ID. Did you perhaps have two elements with the IDtest-popup
?Best regards,
SarahAugust 30, 2017 at 5:14 am #845568Yes I did.
thats why I added the second msg to clarify I fixed it by changing the ID name..August 30, 2017 at 5:44 am #845581Hi,
Do you still need help then, or has this issue been solved?
Best regards,
Jordan Shannon -
AuthorPosts
- You must be logged in to reply to this topic.