I person written this codification which works perfectly good successful CodePen, to update the worth of an input[type='number'] tract connected my azygous merchandise listing page. The crushed for doing truthful is to person wholly restyled fig input, to lucifer the styling requirements by the client. The occupation is its not moving connected Wordpress.

the codification is

<script> const antagonistic = document.querySelector(".qty, input[type=number]"); const plusBtn = document.getElementById("increase-qty"); const minusBtn = document.getElementById("decrease-qty"); let countValue = counter.value; let number = 0; counter.addEventListener ("change", (e)=> { countValue = e.target.value; }) function increment() { number ++; countValue = count; counter.value = countValue; alert(`The caller number is ${countValue}`) } function decrease() { if (count === 0){ countValue = count; } other { number --; countValue = count; counter.value = countValue; alert(`The caller number is ${countValue}`) } } plusBtn.addEventListener("click", increment); minusBtn.addEventListener("click", decrease); </script>

I person tried it arsenic some an html constituent with publication tags, arsenic shown above, and by inserting it utilizing customized codification arsenic portion of elementor pro builder.

What americium I missing? I americium definite the id and the selectors are correct.

a nexus to the pen is here

Codepen

asked 4 hours ago

Yenmangu's idiosyncratic    avatar

3