Love the animation! but one problem is after you can hit the add to cart you can hit the minus button and start going into the negatives with numbers.
Yeah I see that I will be fix that tomorrow
The problem is with card_value.nodeValue. Value of nodeValue used on an element returns null. So you should use an alternative for nodeValue like innerText or innerHTML.
card_value.nodeValue
Something like this:
if(Number(card_value.innerText) - 1 >= 0){ card_value.textContent = cartvalue -=1; }
Thanks bro I just copied your and edited code. Because of you I fix today
@patrykdeja is fix this code now its works fine
Are you sure you want to hide this comment? It will become hidden in your post, but will still be visible via the comment's permalink.
Hide child comments as well
Confirm
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
Love the animation! but one problem is after you can hit the add to cart you can hit the minus button and start going into the negatives with numbers.
Yeah I see that I will be fix that tomorrow
The problem is with
card_value.nodeValue
. Value of nodeValue used on an element returns null. So you should use an alternative for nodeValue like innerText or innerHTML.Something like this:
Thanks bro I just copied your and edited code. Because of you I fix today
@patrykdeja is fix this code now its works fine