With this code (JS)
<script>
function changeText(element){
element.innerHTML = "<span class='icon-remove3'>Content icon-remove3</span> Eliminar del pack";
element.style.background = "#CCC";
}
</script>
I can change the content of the following label:
<label class="anadir_producto" for="additional_buy_{$packcontent.id_product}" onclick="changeText(this);" id="anadir"><span class="icon-4">Content Icon 4</span>Añadir al pack</label>
but the problem comes when I am trying to switch back to "Añadir al pack", since it does not toggle back.
Any clue?