Orbit slider in a Limelight Stacks content

I tried an Orbit slider inside a Limelight Stack and the Orbit does not have any height until the first image animation finishes. I have variable height checked in Orbit.

Duplicating the same Orbit on the main page produces a normal functioning Orbit.

Is there an addition setting needed within Limelight or is this just not possible?

Is LL set to Lazy PreLoad?
If that doesn’t work the only sure fire way will be to pull it in via a WebPage/iFrame LL Content child.

No, unfortunately Lazy Load doesn’t sort that issue.

I will have a good think about the Web/iFrame Child solution.


I’m not surprised - it is the usual case of the orbit code needing to be run once the element is visible so that it can calculate its size.

Limelight does fire an event on the window when it opens the lightbox and so in theory you could attach a user event to that which triggers an orbit reflow.

window.addEventListener('infix:open', function (e) {
1 Like

I think for the moment I will abandon the idea of a slider in modal window and if a slider is really needed, then I will create a layout on a normal page.

Just for future reference, I’ve just made a jQuery event which will be easier for users and other stacks to access. It will be in the next update

//do something

Actually - I might change that to limelight:open (infix was the working name for the library during development as it fix ed a lightbox in a section)

That would be handy. Thanks

I’ve always had trouble with Orbit inside modals. I vaguely remember solving when using Reveal as the modal by attaching some height code to Reveal.

OK this is what I did:
@media screen and (max-width:640px) {#testimonial .orbit-container {min-height:540px;}}
@media screen and (min-width:641px) {#testimonial .orbit-container {min-height:400px;}}

Basically set min-height of .orbit-container depending on screen width. Not much fun.

1 Like

Good idea. I tried it and with a couple more media queries for more BP’s and it works quite acceptably. Thanks

1 Like

Glad to have helped. There’s always a BP grey area which is specific to nature of content. Kinda bored of playing that game, but it is what it is.

I found an easier way which is to use the Foundation Image stack and set preload image in the first image set to the height that the first image would be on a desktop screen. If the image appears too high in the first initial view on a mobile, the height will correct itself after the first transition.

That is a smart solution

Yes but what if you’re not using images in the slider?

Put an image of nothing but white (or whatever background colour it’s on) as the 1st item?

1 Like

Or perhaps you could load a Foundation image with a 1px x 1px transparent image, above the normal first slide contents and set the image to preload a large height image.

This is all getting a bit convoluted and hacky. Clearly the best solution is just to trigger a Foundation reflow on Orbit when LL opens.