Permalink
Browse files

Merge pull request #35 from cameronmcefee/lukekarrys-master

Lukekarrys master
  • Loading branch information...
2 parents 1ba0c2c + 6f375de commit 8a9c3b9e0163bf16687b781b7860c0ef384560e2 Cameron McEfee committed Dec 11, 2012
Showing with 9 additions and 1 deletion.
  1. +5 −1 js/plax.js
  2. +4 −0 readme.md
View
@@ -210,10 +210,14 @@
// $.plax.disable()
// # plax no longer runs
//
+ // $.plax.disable({ "clearLayers": true })
+ // # plax no longer runs and all layers are forgotten
+ //
// returns nothing
- disable: function(){
+ disable: function(opts){
$(document).unbind('mousemove.plax')
window.ondeviceorientation = undefined
+ if (opts && typeof opts.clearLayers === 'boolean' && opts.clearLayers) layers = []
}
}
View
@@ -92,6 +92,10 @@ __Parameters__
Disable parallaxing.
+__Parameters__
+
+`clearLayers` — Boolean: (optional) clears all previously defined layers when disabling.
+
## Best Practices

0 comments on commit 8a9c3b9

Please sign in to comment.