Answer the question
In order to leave comments, you need to log in
Simple JS code for minimum order amount?
Hello everyone, I didn’t find a suitable code ... The crux of the matter ...
There is a basket, there are goods, I didn’t score 1000 rubles in the basket, the checkout button is not available.
I tried to do it, but it doesn't work:
$(function() {
if ($('total').text() < 1000)
$("succes mybtn").css("display", "none")});
Help me please))
Answer the question
In order to leave comments, you need to log in
If the selectors are spelled correctly, then this will work.
$(function() {
if (parseFloat($('total').text()) < 1000) {
$("succes mybtn").hide();
}
});
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question