I am using a counter to display appropriate information upon each click, but I can not get the button to work past one click. I believe I am adding to my counter correctly but for some reason it is not registering properly. Any modifications would be appreciated.
$(document).on("click", ".proceedBtn", function() {
$i = 0;
$i = $i + 1;
if ($i == 1){
if ($i == 2){
$('#billingQuestions').hide();
$('#billingQuestions2').hide();
$('#noQuestions').hide();
$('#noQuestions2').hide();
$('#paymentInfo').show();
$('#paymentInfo2').show();
$('.arrow').css('left', '84%');
console.log("payment");
return;
}
$('#noQuestions').show();
$('#noQuestions2').show();
$('#billingQuestions').hide();
$('#billingQuestions2').hide();
$('#paymentInfo').hide();
$('#paymentInfo2').hide();
$('.arrow').css('left', '50%');
$i++;
console.log("shipping");
return;
}
});