I have a wordpress site and I use ACF. (https://www.advancedcustomfields.com/). I have several articles on my home page with a unique image for each article.
This is what I use for my article's images :
<div class="image_cover_home" style="background-image:url(<?php echo get_field('image_cover', $value->ID)['url'] ?>)" >
My php echo get_field works with this code : I have different image, one for each article :
I tried to use a parallax effect on these images, so I use this script : http://pixelcog.github.io/parallax.js/
$('.image_cover_home').parallax({
imageSrc: '<?php echo get_field('image_cover', $value->ID)['url'] ?>',
naturalWidth: 400,
naturalHeight: 200,
speed:0.8
});
The problem is when I put my php echo field on this jquery script, it doesn't recognize the ID of my images. So I have the same images for each article...
Why ?

