I am using the Carousel within a column that is initially hidden and only displayed after it is triggered through a button click. To do this, I use display: none; and switch then to display: block;
Apparently this keeps the Carousel from loading at page load, and I couldn’t find a way to load it with the button click.
Are there any ways to trigger the loading of the carousel through javascript (or css, though unlikely)? Are there any methods for reinitializing or refreshing modules like the post carousel?
Alternatively, is there any way to trigger a resize event? When I resize the browser manually, it displays, so basically resizing seems to solve the problem. However, I tried to trigger a resize event with the button click and that doesn’t work.
Thank you for the reply.
What kind of trigger event works? To 1) resize or to 2) refresh/reinitialize the post-carousel or 3) anything else?
if it’s 2) how can I control the carousel through javascript?
if it’s 1), I used window.dispatchEvent(new Event(‘resize’)); with a timeout, but it didn’t work.
(sidenote: alternatively I could also use the post-slider if that is easier to target through javascript)