Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • #1289940

    Dear Support team.

    I’m happy with enfold website in past days. but recently after updating. my popup window disappear.
    when visitor click the “Ask A Quote” button. there’s a cf7 contact form coming on a modal window before.
    but now it just go to the top when click. you can check the code:

    <h3>Ask A Quote</h3>

    <div id=”test-popup” class=”white-popup mfp-hide”>
    [contact-form-7 id=”7887″ title=”Contact form 1″]
    </div>
    and the PHP function code has be done before:
    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’);

    CSS code is also write into the CSS file beofre.

    now the function is not working. could you please help me with this?

    #1290386

    can I have someone could help me with this?

    #1290695

    Hi,

    This works on my end:

    <h3><a class="open-popup-link" href="#test-popup">Ask A Quote</a></h3>
    <div id="test-popup" class="white-popup">Content</div>
    function popup_inline() { ?>
      <script>
        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');

    Best regards,
    Rikard

    #1290698

    replace this line ( it is deprecated in jQuery 3.5.1)

    jQuery(window).load(function(){
    

    with that line:

    jQuery(window).on('load', function(){
    

    and if you got a click event on your child-theme function.php
    replace it in the same way with

    // old:
    .click(function () {
    // new:
    .on('click', function() {
    #1290926

    Thank you very much. the function comes back to right way.many thanks for your help!!!!

    #1291293

    Hi keir2012,

    We’re glad that this is resolved :)
    Thanks for using Enfold and have a great day!

    @Guenni007thanks for helping out. :)

    Best regards,
    Nikko

Viewing 6 posts - 1 through 6 (of 6 total)
  • The topic ‘pop up Modal window disappear after updating’ is closed to new replies.