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

Image won't display until scroll #58

Open
DevFool opened this issue Feb 7, 2018 · 1 comment
Open

Image won't display until scroll #58

DevFool opened this issue Feb 7, 2018 · 1 comment

Comments

@DevFool
Copy link

DevFool commented Feb 7, 2018

I love this package but I have one small problem. The parallax image won't display until the scroll bar is move or the window is resized. I set the div with:

My javascript section includes the following:

<script src="//ajax.googleapis.com/ajax/libs/jquery/1.2.1/jquery.min.js"></script> <script type="text/javascript" src="js/jquery.imageScroll.js"></script> <script> $('.img-holder').imageScroll({ // image: null, // imageAttribute: 'image', // container: $('body'), // windowObject: $(window), // speed:.2, // coverRatio:.75, // coverRatio:1, // holderClass: 'imageHolder', // imgClass: 'img-holder-img', // holderMinHeight: 200, holderMaxHeight: 75, // extraHeight: 50, // mediaWidth: 1600, // mediaHeight: 250, // parallax: true, // touch: false }); instance.refresh(); </script>

Thanks.

DonB

@DevFool
Copy link
Author

DevFool commented Feb 8, 2018

I have discovered the cause but I have no idea how to solve it.
I use a javascript slider called modern-slider. If the parallax code is set before the slider everything works as advertised however if it is after the slider code the parallax image is visible but it is down the page by the space equivalent to the number of images in the slider (as if they are stacked), As soon as you move a scroll bar it then moves everything to where it should be. So at this point I am removing the parallax code until I have a solution for the problem.

Thanks
DonB

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

1 participant