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

Occasionally the first slide is hidden, flex-viewport height is 0px #278

Closed
kimlawler opened this issue Aug 8, 2012 · 7 comments
Closed

Comments

@kimlawler
Copy link

I'm getting an odd bug whereby occasionally the flex-viewport div has its height set to 0px on load, and doesn't resize to fit the height of the first slide. This happens about once every.. 10 refreshes or so!

Help?!

@kimlawler
Copy link
Author

Figured it out:

I was using smoothHeight for the slider, and actually initialising flexslider in the document.ready rather than window.load, so flexslider couldn't grab the first image's height and set the viewport, thus it was setting it to 0. Now that I've moved my .flexslider function tinto window.load everything's dandy! :)

@tylernotfound
Copy link
Contributor

Great! Glad you got it sorted out. :)

@yantakus
Copy link

I have a very similar problem. I have a one-page layout and my images are loaded by a script after a section is loaded. So my slider's height is 0px by default and it works only after a refresh of the page. You can see it here: http://smartseven.ru/#/portfolio/botscanner (click on any thumb at the top of the page).

Is there a solution? Thank you.

@itsdavidmorgan
Copy link

You saved me a huge headache kimlawler! Thanks :)

@chimos
Copy link

chimos commented Oct 16, 2013

Hi,
I have this 'smooth height' problem too.

Which are the files including these functions explained by kimlawler? (document.ready and window.load)
How can I tweak this if I'm using 7x-2alpha1?

Thanks

@Beckyj01
Copy link

How do you move the function into window.load? Can you do this even if you are using drupal?

@verytwisty
Copy link

Thanks for posting this - but window.load didn't work for me for some reason.

But window.ready did! Just thought I'd share in case anyone was having the same problem.

$(window).ready(function(){

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

No branches or pull requests

7 participants