Data-image-src attribute of library parallax.js

1

Hello good afternoon, I'm using the parallax.js library for my effects on the background images of my website. I have a problem when I want to change an image with a jquery event using attr ...

<div id="imageChange" class="backgrounds parallax-window" data-parallax="scroll" data-image-src="img/background1.png"></div>


$(document).ready(function(){
    $("#container2").mouseover(function(){
        $("#imageChange").attr('data-image-src', 'img/background2.png');

    });
});

At the time of inspecting an item if it changes by background2 but the page does not update the image.

    
asked by Orlando Escamilla 24.10.2017 в 18:54
source

0 answers