Add plus minus ram handler for 512MB option

This commit is contained in:
PCoder 2018-09-28 08:07:08 +02:00
parent e1ce017ec8
commit db20e3cbe7

View file

@ -148,15 +148,23 @@
var data = $(this).data('minus');
if (cardPricing[data].value > cardPricing[data].min) {
if(data === 'ram' && cardPricing[data].value === 1){
cardPricing[data].value = 0.5;
} else {
cardPricing[data].value = Number(cardPricing[data].value) - cardPricing[data].interval;
}
}
_fetchPricing();
});
$('.fa-plus-circle.right').click(function(event) {
var data = $(this).data('plus');
if (cardPricing[data].value < cardPricing[data].max) {
if(data === 'ram' && cardPricing[data].value === 0.5){
cardPricing[data].value = 1;
} else {
cardPricing[data].value = Number(cardPricing[data].value) + cardPricing[data].interval;
}
}
_fetchPricing();
});