Why doesn't the lock button after pressing it, JS?

Hello! It turns out the situation is, I need to remove the button after pressing it, I did so .
Everything works fine, but I can't understand why the same code does not work for me on the website.


Although the html code of the button are identical, can someone tell me I am suffering with this issue for very long.
April 19th 20 at 12:08
1 answer
April 19th 20 at 12:10
and maybe there are more blocks with the class "simplecheckout-button-right"
I think your block to js need closure:
const simplecheckoutButtonRight = document.querySelectorAll(".simplecheckout-button-right");

simplecheckoutButtonRight.forEach(el => {
 const btn = el.querySelector(".button");
 b.addEventListener("click", function() {

try this
of course maybe I'm wrong
Not easy to put a check on the existence of a button?
Why short?
There is a problem related scripts because it in itself works. - Salvatore18 commented on April 19th 20 at 12:13
Sorry, but Your code is also not working, although I noticed one detail from that my code works in chrome but not working in Mozila, can't understand why - elliot.Bashirian commented on April 19th 20 at 12:16

Find more questions by tags JavaScript