kandi X-RAY | davegamache Summary
kandi X-RAY | davegamache Summary
davegamache
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
Currently covering the most popular Java, JavaScript and Python libraries. See a Sample of davegamache
davegamache Key Features
davegamache Examples and Code Snippets
Community Discussions
Trending Discussions on davegamache
QUESTION
I am trying to do a simple parallax effect with jQuery and CSS.
I have 2 long divs, one is 2000px
and the other is 1000px
each one of those divs have a child div with text inside.
I would like to have these child divs to be centered in the middle of the visible window (not the div which is 2000px
high, just the visible window) and to stay centered and in the middle while I scroll down, then fade out at a certain point before reaching the next div.
At the moment, I managed to create the html layout and the css, and made the divs to fade out on click using jQuery.
But I am unable to center them in the middle of the window and keep them fixed while I scroll down and fade them out before reaching the next div.
Maybe I can use Waypoint.js to trigger events at certain points in the scroll but how do I keep the div centered and visible to achieve the parallax effect?
DEMO https://jsfiddle.net/fmub10pv/4/
EDIT Are there any plugins (with demo) that can achieve what I want?
EDIT 2 The desired effect is something like this http://davegamache.com/parallax/
HTML
...ANSWER
Answered 2017-Mar-28 at 00:04Add fade-in
class to the first div initially
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install davegamache
Support
Reuse Trending Solutions
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesStay Updated
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page