I want to change the value of a custom attr via jquery, but without success. Here is the code below:
$("#botao-01").click(function() {
$("#img-screen").attr("data-image","img/bauru-02.jpg");
});
<div id="img-screen" class="tile" data-scale="2.4" data-image="img/bauru-01.jpg" alt="Equipamento 01"></div>
What I want is when I click on a selector it changes the image that was set via data-image plus all this via jquery.
I've tried countless more unsuccessful options so far ... can anyone give me a light?
Thank you!