23 lines
599 B
JavaScript
23 lines
599 B
JavaScript
$(document).ready(function ($) {
|
|
$.ajaxSetup({
|
|
headers: {'X-CSRF-TOKEN': $('meta[name="csrf-token"]').attr('content')},
|
|
beforeSend: function() { layer.load(2, {shade: [0.3,'#fff'] }); },
|
|
complete: function() { layer.closeAll('loading'); },
|
|
});
|
|
|
|
$('.quantity-wrap .right i').on('click', function(event) {
|
|
let input = $(this).parent().siblings('input')
|
|
|
|
if ($(this).hasClass('bi-chevron-up')) {
|
|
input.val(input.val() * 1 + 1)
|
|
return;
|
|
}
|
|
|
|
if (input.val() * 1 <= input.attr('minimum') * 1) {
|
|
return;
|
|
}
|
|
|
|
input.val(input.val() * 1 - 1)
|
|
});
|
|
});
|