jQuery Skrollr plugin: using skrollr constants as data values

264 views Asked by At

Is it possible to use constants (which are actually not constants) for values, too? For ex:

<div data-_foo="_bar"></div>

and

skrollr.init({
   constants: {
     foo: function () { return 500; },
     bar: function() { return 'top: 200px';}
   }
});

A use case would be for example when the animation values depends on the screen size.

1

There are 1 answers

0
Seer On BEST ANSWER

Ok, actually can be easily resolved with changing the values of the data-_foo on resize. 1 step more is not so much...