Closed kozyrev-artem closed 4 years ago
This is still an issue with the Yarn/NPM module :(
Still waiting for @moeamaya to either fix this or accept my PR #188 😢
In the meantime, you can mitigate this problem by just providing an empty object as options:
var rellax = new Rellax('.parallax', {});
File - rellax.js
Line - 177 if (options.breakpoints) { validateCustomBreakpoints(); }
When init function without options such issue appear "TypeError: options is undefined"
Init code:
import Rellax from 'rellax'; jQuery(function() { initParallax(); }); function initParallax() { jQuery('[data-parallax]').each(function() { new Rellax(this); }); }