0
<span data-bn-type="text" class="herewego" style="display: none;">25</span>

How to set "value change" event for this span?

I tried something like this :

document.querySelector('.herewego').addEventListener('change', function(){
    alert("Works!");
})

So.. nothing happened. What im doing wrong?

HolaBook
  • 27
  • 5

1 Answers1

0

I believe that you might need to change the query selector for getElementsByClassName and maybe add a click event idk how you would be able to change the span since its not like an input also where it says display:none well that would hide your text so you cant even see it so remove that

document.getElementsByClassName('herewego')[0].addEventListener('click',function(){
alert("Works!");
})
VericalId
  • 105
  • 12