• Resolved wan109020

    (@wan109020)


    Hi there,
    If popup triggers are loaded to the content at later time (eg. using ajax) instead of when the page initialize, an JS error “i.do_default is undefined” occurs when clicking the trigger. This is because dynamically loaded triggers miss the “data-settings” tag.

    As a temporary workaround, I manually add “data-settings=”” to the trigger.

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Author Daniel Iser

    (@danieliser)

    @wan109020 – Do you have an example I can see. I cannot duplicate this as data-setting is added even late. v1.5.4 & v1.5.5 actually added & perfected late loading of click triggers: https://github.com/PopupMaker/Popup-Maker/blob/master/assets/js/src/site/plugins/pum-triggers.js#L61-L91

    You can see we initialize once then add a listener for late items, if pum-trigger class is missing it hasn’t been initialized, so we do, cancel the click and reclick.

    If it is erroring then I need to see it so I can try to figure out why. I guess it could be in the actual click trigger event near the bottom of that file running both clicks, but erroring the first time. Need to know how I can duplicate it like you have though cause it works correctly for me.

    Thread Starter wan109020

    (@wan109020)

    Oh! My fault.

    It’s not because of late init that make it not working, but because I added the triggers inside other plugins. It is the other plugin’s matter.
    I don’t want the example being made public.

    Btw, appreciate you quick reply. Great support.

    • This reply was modified 7 years, 8 months ago by wan109020.
    Plugin Author Daniel Iser

    (@danieliser)

    @wan109020 – Did you get the issue worked out then? If so Please take a moment to click that it Works and to rate and review the plugin or support.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Error looking up data-settings tag if popup triggers are dynamically loaded’ is closed to new replies.