Permalink
Browse files

merge lukekarrys-master

  • Loading branch information...
2 parents 1ba0c2c + ec451c1 commit 6f375de9e4deae79ea47464a629e7e02dd55b144 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 6f375de

Please sign in to comment.