Trigger LISE After Page is Loaded
Posted: Wed Nov 01, 2023 3:50 pm
Hi All,
I'm using LISE to display event items on a page. The page is displaying all events from a particular category (area) and is using javascript to filter through the sub categories (day of the week and type of event). Each event appears as a card with a short description and an image (we are using tag webp_image tag to convert the images to webp).
The issue we are having is the slow page load as we are loading upwards of 100 events on the page.
One solution we are looking to explore is to load the rest of the page first then trigger the LISE tag once it is complete. I was thinking of having a separate page/template that only contains the LISE tag and then loading that page via Ajax (ie have a page called "Area1" which loads the contents of "Area1LISE" via AJAX) but I'd rather do it without having to create the extra pages/template as the site is bilingual and there are multiple areas.
Is there anyway to trigger the LISE instance with javascript after the page is loaded?
Thanks in advance for your help.
James
I'm using LISE to display event items on a page. The page is displaying all events from a particular category (area) and is using javascript to filter through the sub categories (day of the week and type of event). Each event appears as a card with a short description and an image (we are using tag webp_image tag to convert the images to webp).
The issue we are having is the slow page load as we are loading upwards of 100 events on the page.
One solution we are looking to explore is to load the rest of the page first then trigger the LISE tag once it is complete. I was thinking of having a separate page/template that only contains the LISE tag and then loading that page via Ajax (ie have a page called "Area1" which loads the contents of "Area1LISE" via AJAX) but I'd rather do it without having to create the extra pages/template as the site is bilingual and there are multiple areas.
Is there anyway to trigger the LISE instance with javascript after the page is loaded?
Thanks in advance for your help.
James