At page I have many button active state of type. I bind to the event click and check how many button have active status. But when I click at first button I get zero.
$(".btn-quote").on("click", function (e) {
var totalActiveQiote = $(".btn-quote.active").length;
if (totalActiveQiote > 0) {
console.log("active");
} else {
console.log("deactive");
}
});
What I should do to fix this?
