I am trying to change a certain value inside my html code, through JS-JEQUERY, but it is not changing, my logic is wrong?
Follow the code:
var valor = "texto";
$('.botao botao-comprar principal grande desativo with-popover').on('click', function () {
$(this).data('data-content', valor);
});
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script><ahref="javascript:;" class="botao botao-comprar principal grande desativo with-popover" rel="popover" data-placement="left" data-trigger="hover" data-content="Selecione uma opção de atributo disponível." data-original-title="IMPORTANTE">
<i class="icon-shopping-cart"></i> Comprar
</a>