1
I want to change the value of a custom attr via jquery, but without success. Follow 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 you click on a selector it changes the image that was set via data-image plus all this via jquery.
I have tried countless more unsuccessful options so far... someone can give me a light?
Thank you very much!