Embeded code not loading

I am using Visual composer. I would like to embed code in a popup. I have tried to do this, but it is not working.

  • Lindeni Mahlalela
    • Recruit

    Hello Benji,

    I hope you are doing great today. I am sorry you are having trouble adding a widget to a popup. After some great deal of effort trying to make this work, I finally see it is not easy to do without modifying either the PopUp plugin or the script that loads the widget from the remote website.

    In the console, I see this error: PR Widget - No element matching id callback_widget

    This is because, PopUp plugin only initialize after it has been triggered, if the PopUp was not triggered then the element ‘callback_widet” will not be available in the DOM object. Maybe an Advanced JavaScript developer can do this without modifying any of the plugin, as for me, I would modify the code of the script so that it injects the widget after PopUp has been loaded.

    I have also noticed that in the Visual Composer, the ‘callback_class” was added to the button, but unfortunately Visual Composer applies the class to the container of the button not on the button itself, this makes it difficult for user to trigger the popup as they will have to click on the container but they don’t know that, so I have inspected the button and found its CSS classes, then I have chosen to use ‘vc_btn3’ class for the trigger. I changed this in the PopUp settings.

    For now, I suggest you write some code or find someone to write some code to target the ‘callback_widget’ after PopUp is initialized. I will try to find a way but I have spent so much time on this already and due to the limitations of the support forum I cannot spend any more time to try and write a solution, I am sure someone can suggest something.

    I hope you enjoy the rest of your day.



Thank NAME, for their help.

Let NAME know exactly why they deserved these points.

Gift a custom amount of points.