Elementor JS Hooks When can they be used

Поділитися
Вставка
  • Опубліковано 30 лип 2024
  • Have you tried using the Elementor Developer docs for JavaScript events, only to find that they don't work as expected?
    My experience was that objects you expected to be initialised were not always done yet. So you add your hook listener, then try to access an object on elementorFrontend only to get an undefined error.
    It turns out the reason is that the 'elementor/frontend/init' dispatches before many items are initialised. So you have to either use setTimeout to delay execution or listen for additional events.
    This video explains what I found.

КОМЕНТАРІ • 4

  • @RobertBiswas-Web-Developer
    @RobertBiswas-Web-Developer 5 місяців тому

    Hi, Thank you so much for this video. Last couple of weeks I was stargling with this issue. Elementor Docs didn't help. And now your video just restore my peace in mind. Thank you so much. Anyway I'm from Bangladesh. Have a good day.

  • @jameswagstaff7180
    @jameswagstaff7180 3 місяці тому

    You legend!!! Thanks for figuring this one out.

  • @robertostringa9254
    @robertostringa9254 4 місяці тому

    Thank you very much, great contribution. I have a question that I couldn't solve, is it possible to prevent the images inside a popup from loading until the popup opens? Because I see in devtools that they load when the page loads with all the resources. Thanks.

    • @wpeasy
      @wpeasy  4 місяці тому

      Sorry, I have not used Elementor for more than a year now. A lot has changed in that time, so I am not sure what features it has.