Parallax.js wrapper for react
import React, { Component } from 'react'
import Parallax from 'parallax-js' // Now published on NPM
class ParallaxComponent extends Component {
componentDidMount() {
this.parallax = new Parallax(this.scene)
}
componentWillUnmount() {
this.parallax.disable()
}
render() {
render (
<ul ref={el => this.scene = el}>
<li className="layer" dataDepth="0.00">
<img src="layer1.png"/>
</li>
<li className="layer" dataDepth="0.50">
<img src="layer2.png"/>
</li>
<li className="layer" dataDepth="1.00">
<img src="layer3.png"/>
</li>
</ul>
)
}
}
Also in JavaScript:
- how to scroll down to the bottom of a div using javascript
- javascript add row to table
- simple express server
- play audio javascript
- javascript location redirect
- javascript ceiling
- listerner content loaded js
- crypto node
- jquery get data attribute value
- node updaten
- javascript date get day of week abbreviation
- Javascript get text input value
- js dom ready function
- jquery detect textarea change
- ajax django send array
- input not detecting text
- jquery get selected option value
- javascript if elseif
- javascript write to file
- length of list in javascript
- shadow in react native
- install react js
- how to host react app on heroku
- js yesterday date