Permalink
Browse files

Read params from element data-* attrs

  • Loading branch information...
1 parent cb2607d commit cab9dbbb89409d0de2ad3c58a100c043571f5f94 @josh josh committed Oct 3, 2011
Showing with 5 additions and 1 deletion.
  1. +5 −1 js/plax.js
View
@@ -52,7 +52,11 @@
return this.each(function () {
var layerExistsAt = -1
- var layer = {"xRange":0,"yRange":0,"invert":false}
+ var layer = {
+ "xRange": $(this).data('xrange') || 0,
+ "yRange": $(this).data('yrange') || 0,
+ "invert": $(this).data('invert') || false
+ }
for (var i=0;i<layers.length;i++){
if ($(this).attr('id') == layers[i].obj.attr('id')){

0 comments on commit cab9dbb

Please sign in to comment.