first commit
This commit is contained in:
26
resources/assets/js/demos/demo-product-landing.js
Normal file
26
resources/assets/js/demos/demo-product-landing.js
Normal file
@ -0,0 +1,26 @@
|
||||
/*
|
||||
Name: Product Landing
|
||||
Written by: Okler Themes - (http://www.okler.net)
|
||||
Theme Version: 12.1.0
|
||||
*/
|
||||
|
||||
(($ => {
|
||||
/*
|
||||
Quantity
|
||||
*/
|
||||
$('.quantity .plus').on('click',function(){
|
||||
const $qty=$(this).parents('.quantity').find('.qty');
|
||||
const currentVal = parseInt($qty.val());
|
||||
if (!isNaN(currentVal)) {
|
||||
$qty.val(currentVal + 1);
|
||||
}
|
||||
});
|
||||
|
||||
$('.quantity .minus').on('click',function(){
|
||||
const $qty=$(this).parents('.quantity').find('.qty');
|
||||
const currentVal = parseInt($qty.val());
|
||||
if (!isNaN(currentVal) && currentVal > 0) {
|
||||
$qty.val(currentVal - 1);
|
||||
}
|
||||
});
|
||||
})).apply( this, [ jQuery ]);
|
Reference in New Issue
Block a user