• Resolved siriusly

    (@siriusly)


    Hello — Had everything working great for email disclaimer statement — opening email app & closing modal window — with the help you provided in this thread:
    https://www.ads-software.com/support/topic/close-modal-when-opening-email-app?replies=10
    Haven’t updated/changed anything in the meantime (except possibly Firefox), and found today that modal has stopped working — the user’s email app no longer opens on clicking “Accept.”
    Site is here: https://bit.ly/1zmr3cT (click on email icon)

    Here’s the script in the child theme’s footer.php:

    <script>
    jQuery(document).ready(function () {
    jQuery(‘#eModal-1, #eModal-2, #eModal-3, #eModal-4, #eModal-5, #eModal-6, #eModal-7, #eModal-8, #eModal-9’).find(‘.flat-custom-button’).click(function (e) {
    e.preventDefault();
    jQuery(this).parents(‘.emodal’).emodal(‘close’);
    });
    });
    </script>

    Any ideas would be most welcomed! Thank you!

    https://www.ads-software.com/plugins/easy-modal/

Viewing 4 replies - 1 through 4 (of 4 total)
  • Hey siriusly,

    Thanks for your inquiry. Are you running the latest version of Easy Modal? If not, try updating the plug-in and see if that solves your issue.

    Let me know if this works or not, or if you’re already updated.

    Thanks!

    Thread Starter siriusly

    (@siriusly)

    Thanks! Will give the upgrade a try and let you know… weird that previous version was working fine, though.

    Thread Starter siriusly

    (@siriusly)

    Hello again. Finally getting back to you on this… Updated to most recent version 2.0.16 and the script does not work as intended. Site is at https://tinyurl.com/operrxp Modal is triggered with click on email icon.

    The goal is to have the user’s email app open when they click on the “Accept” button, and to have the modal close automatically at the same time so it is not there when they return to the website. Currently, when the script is active, the modal closes without opening the email app. If I disable the script, the email app opens, but modal does not close (of course).

    Many thanks for your help!

    Thread Starter siriusly

    (@siriusly)

    Solved!

    For some reason the preventDefault statement in the script was now blocking the email function (why it didn’t earlier, I have no clue). In any case, removing that statement fixed everything, so now the script is this:

    <script>
    jQuery(document).ready(function () {
    jQuery('#eModal-1, #eModal-2, #eModal-3, #eModal-4, #eModal-5, #eModal-6, #eModal-7, #eModal-8, #eModal-9').find('.flat-custom-button').click(function (e) {
    jQuery(this).parents('.emodal').emodal('close');
    });
    });
    </script>
Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Email link from modal was working and now stopped’ is closed to new replies.