Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Problem with slider height #479

Closed
fusi-sdm opened this issue Oct 24, 2016 · 2 comments
Closed

Problem with slider height #479

fusi-sdm opened this issue Oct 24, 2016 · 2 comments

Comments

@fusi-sdm
Copy link

Hi all,
i have a problem with slider and height.
If i initialize the slider in the document.ready, the slider will have height 0px the first time i load the page.
If i initialize the slider in window.load, it works but for an instance i will see all the slide in a column.

What is the best practice for that?

Thank you

@willpower232
Copy link

Presumably you would see all the slides in a column if the javascript fails to load so that is your starting point.

Ordinarily you would want all the slides to be visible for accessibility reasons.

However if you want the content to be hidden, I add a class of "unflickity" to the parent element of the slides which is removed before flickity is activated and has this CSS:

.unflickity .slide:not(:first-child) {
    display:none;
}

@desandro
Copy link
Member

I'm sorry to see you're having trouble with Flickity. Could you provide a reduced test case? See Submitting Issues in the contributing guidelines.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

No branches or pull requests

3 participants