Hi,
I would like to put this Inline Popup Call in a button.
<a class="open-popup-link" href="#logg">LOG</a>
How could I do that?
THANKS
Hey CloudChoice!
Please refer to Josue’s post here – https://kriesi.at/support/topic/inline-content-in-magnific-popup/#post-289356
Regards,
Yigit
Hi,
This is not the problem. The JS already in the fuctions.php.
My question is:
How can I put the link in the button?
I want to put this link: CLICK HERE`
Inside the button.
THANKS
<a class="open-popup-link" href="#logg">CLICK HERE</a>
Hi,
Any idea?
THANKS
Hi!
You could use a button with a class set (.open-popup-link), and you’d change the JS code accordingly:
jQuery('.open-popup-link a').magnificPopup({
type:'inline',
midClick: true
});
Cheers!
Josue
Hi,
Works nice.
BUT how I changed the code belllow in chield functions, the other Inline just to stop. How can I keep the two solutions?
function add_custom_script(){
?>
<script>
jQuery(window).load(function(){
jQuery('.open-popup-link <strong>a</strong>').magnificPopup({
type:'inline',
midClick: true
});
});
</script>
<?php
}
add_action('wp_footer', 'add_custom_script');
Hey!
You can target multiple elements:
jQuery('.open-popup-link a, .open-popup-link').magnificPopup({
type:'inline',
midClick: true
});
Cheers!
Josue
Can you disable the caching for a moment?
Best regards,
Josue
Of course.
Done.
I believe you need make a difference when you use the inline link in a button / hyperlink:
jQuery(window).load(function(){
jQuery('.open-popup-link-button a, .open-popup-link').magnificPopup({
type:'inline',
midClick: true
});
});
Set the button class to “open-popup-link-button” instead.
Regards,
Josue
Hi,
You’re right.
Now is working.
Thank you very much.
Great, you are welcome :)
Regards,
Josue