Viewing 14 posts - 1 through 14 (of 14 total)
  • Author
    Posts
  • #289914

    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

    #290102

    Hey CloudChoice!

    Please refer to Josue’s post here – https://kriesi.at/support/topic/inline-content-in-magnific-popup/#post-289356

    Regards,
    Yigit

    #290179

    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

    #290180

    <a class="open-popup-link" href="#logg">CLICK HERE</a>

    #290310

    Hi,

    Any idea?

    THANKS

    #290317

    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

    #290326

    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');
    
    #290334

    Hey!

    You can target multiple elements:

    jQuery('.open-popup-link a, .open-popup-link').magnificPopup({
      type:'inline',
      midClick: true 
    });

    Cheers!
    Josue

    #290337
    This reply has been marked as private.
    #290339

    Can you disable the caching for a moment?

    Best regards,
    Josue

    #290341

    Of course.
    Done.

    #290345

    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

    #290355

    Hi,

    You’re right.
    Now is working.

    Thank you very much.

    #290359

    Great, you are welcome :)

    Regards,
    Josue

Viewing 14 posts - 1 through 14 (of 14 total)
  • You must be logged in to reply to this topic.