Closed hidegh closed 1 year ago
Using some default setup:
$('.jarallax').jarallax({ speed: 0.2, });
Which then locally I'd like to override:
<div class="h-100 w-100 jarallax" data-jarallax data-type="scale" data-speed="-1" data-img-position="0% 50%"> <img class="jarallax-img" src="/assets/bg/team/pexels-fauxels-3184355.jpg"> </div>
I'd always expect the data-attributes (local to the given element) to override the generic jQuery selector values, if provided.
While the data-img-position is applied, the data-speed it totally ignores.
2.0.4
See Issue desc.
Data attributes should not override attributes provided in jQuery / JS calls. The order is defined here: https://github.com/nk-o/jarallax/blob/e38fc74e3bf11f3d6c5d3fabaff4f00f206b0238/src/core.js#L162
Issue description:
Using some default setup:
Which then locally I'd like to override:
I'd always expect the data-attributes (local to the given element) to override the generic jQuery selector values, if provided.
While the data-img-position is applied, the data-speed it totally ignores.
Version used:
2.0.4
Code to reproduce the issue (HTML blocks + JavaScript initialization)
See Issue desc.