As previously announced via banners and our newsletters, support is no longer available through this platform.

For easier navigation, you can still click on "Submit a Ticket" here, choose the appropriate category, and you'll be redirected to the correct support channel for your plugin.

You can still access your previous tickets and browse public tickets, but please note that responding to tickets is no longer possible.

Paid customers: Please log in to your store account for support.

Pre-purchase questions: Use the support widget in the bottom-right corner of our websites:
https://wpamelia.com
https://wpdatatables.com
https://wpreportbuilder.com

Okay
  Public Ticket #2694638
JS Event for when app has loaded?
Closed

Comments

  • Jim started the conversation

    Hi,

    I'd like to do some custom JS on the Ameilia front-end after it loads.

    setTimeOut is often unreliable. Is there an event to watch/listen for when the app has loaded?

  • [deleted] replied

    Hi Jim,

    These are the JS hooks available in Amelia, that are triggered depending on the view:

    window.beforeAddToCalendarLoaded()
    window.beforeBookingLoaded()
    window.beforeSearchLoaded()
    window.beforeSearchFiltered()
    window.afterSearchFiltered()
    window.beforeConfirmedBooking()
    window.beforeCatalogLoaded()
    window.afterSelectCatalogCategory(object_category)
    window.beforeCatalogCategoryLoaded(object_category)
    window.beforeCatalogServiceLoaded(object_category, object_service)
    window.afterSearchActivateService(object_appointment, object_serviceActive)
    window.afterSearchGoToSecondStep(object_appointment, object_serviceActive)
    window.afterBookingSelectDateAndTime(object_appointment, object_serviceId, object_providerId, object_locationId)
    window.afterBookingSelectService(object_appointment, object_serviceId, object_providerId, object_locationId)
    window.beforeConfirmBookingLoaded(object_appointment, object_service, object_provider, object_location)
    window.afterConfirmBooking(object_appointment, object_service, object_provider, object_location)

     So , you can try using one of these to achieve what you need. 

    If you have any other questions or concerns feel free to open a new ticket and we will gladly help out.



  • Jim replied

    Thank you, very helpful.

    Since beforeCatalogCategoryLoaded exists, may I also request afterCatalogCategoryLoaded?

  • [deleted] replied

    You are welcome, Jim. 

    You can suggest it as a feature request here, and I will add it to our feeture requests so it can be considered for implementation in the future. But for now , it isn't available, and I can't say for sure if and when it could be implemented, unfortunately. 

    If you have any other questions or concerns feel free to open a new ticket and we will gladly help out.


  • Jim replied

    Thanks very much, I have requested it.

  • [deleted] replied

    You are welcome, Jim.

    If you have any other questions or concerns feel free to open a new ticket and we will gladly help out.