Custom Javascript

I’m using Bubble to design an app that requires some custom Javascript. I have this in the “Script in the body” box:

$(window).load(function() {
...
});

The problem is that this code runs before the dynamic data on my elements is populated, so I can’t use the data. Is there any way to trigger some custom Javascript from the “Page is loaded” event?

What are you trying to achieve with this script? There’s a good chance you can do it natively in Bubble.

I’m creating a slideshow of images and videos, with text overlaid on each slide. I tried using the Slideshow plugin, but it doesn’t support videos or text.

I would think you could somehow match the timing on a show/hide of text with auto scrolling, or trigger a workflow if it’s click-based scrolling through the slideshow. e.g. when arrow on side of slideshow is clicked (and put a hidden button underneath), show text on image display. on auto scrolling, there may be a way to do this using a custom event/delay. again depends the UX you’re trying to achieve, but I agree, code prob not necessary to achieve a text overlay of an image in slideshow.

Did you have any success on this? I’m also trying to have a video and image slideshow with text overlay.

were you able to figure it out? I’m trying to do the same thing