Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Update readme

  • Loading branch information...
commit b61e53d683a5b60e17f5dc58bcc8977baa12e5ee 1 parent eb4eef8
@cameronmcefee authored
Showing with 14 additions and 3 deletions.
  1. +14 −3 readme.md
View
17 readme.md
@@ -3,12 +3,12 @@ Plax is a [jQuery](http://jquery.com) / [Ender](http://ender.no.de) plugin that
## Dependencies
-### [jQuery](http://jquery.com/) or [Ender](http://ender.no.de/) ###
+**[jQuery](http://jquery.com/) or [Ender](http://ender.no.de/)**
## Usage
-### [Plax Demo](http://www.cameronmcefee.com/plax-demo)
+**[Plax Demo](http://www.cameronmcefee.com/plax-demo)**
In the <head> of your document, link both jQuery and plax.
@@ -42,6 +42,12 @@ $('img').plaxify()
$.plax.enable()
```
+If you would like your elements to parallax only when a certain element is moused over, you need to supply an argument to `enable()`
+
+```javascript
+$.plax.enable({ "activityTarget": $('#shell')})
+```
+
You can dynamically redefine the range of a layer by running `plaxify()` on it again. If the id matches another id in the layer array, it will replace it with the new range.
```javascript
@@ -69,7 +75,7 @@ __Parameters__
`yRange` — integer: is the distance across the y-axis the object will travel.
-`invert` — boolean: inverting will invert the direction the object will travel across each axis.*
+`invert` — boolean: (optional) inverting will invert the direction the object will travel across each axis.*
\* The same effect can be achieved by providing `xRange` and `yRange` with negative numbers, making it possible to invert only a single axis.
@@ -77,6 +83,11 @@ __Parameters__
Enable parallaxing.
+__Parameters__
+
+`activityTarget` — Object: (optional) sets the DOM element over which Plax will be active.
+
+
### disable()
Disable parallaxing.
Please sign in to comment.
Something went wrong with that request. Please try again.