Limit selection input field to 0, 3, 5, and 8

تعرفه تبلیغات در سایت

آرشیو مطالب

امکانات وب

Vote count: 0

I am able to increase/decrease a quantity by whole numbers (expect 0), multiply this quantity by a given price, add a value to the total by a checkbox, and output it all as a total. So far, so good.

My current challenge is to limit the increments/decrements to 0,3,5,8.

I think I will have to alter the following part (or leave it out altogether again) to account for 0s, but hit a wall for the rest:

else {

        if (currentNb > 1) {
            newNb = parseFloat(currentNb) - 1;
        } else {
            newNb = 1;
            button.addClass('inactive');
        }

This is the code I have so far:






   


        

        




  
  

+
= $ 0.00
asked 20 secs ago
FatTwin

نویسنده : استخدام کار بازدید : 2 تاريخ : سه شنبه 15 اسفند 1396 ساعت: 5:59
برچسب‌ها :

خبرنامه

عضویت

نام کاربري :
رمز عبور :