sifatbaho

This commit is contained in:
2026-04-05 05:31:24 +05:00
commit df3d57f503
2609 changed files with 369825 additions and 0 deletions

48
resources/js/pages/form-input-spin.init.js vendored Executable file
View File

@@ -0,0 +1,48 @@
/*
Template Name: Velzon - Admin & Dashboard Template
Author: Themesbrand
Website: https://Themesbrand.com/
Contact: Themesbrand@gmail.com
File: Form input spin Js File
*/
// input spin
isData();
function isData() {
var plus = document.getElementsByClassName('plus');
var minus = document.getElementsByClassName('minus');
var product = document.getElementsByClassName("product");
if (plus) {
Array.from(plus).forEach(function (e) {
e.addEventListener('click', function (event) {
// if(event.target.previousElementSibling.value )
if (parseInt(e.previousElementSibling.value) < event.target.previousElementSibling.getAttribute('max')) {
event.target.previousElementSibling.value++;
if (product) {
Array.from(product).forEach(function (x) {
updateQuantity(event.target);
})
}
}
});
});
}
if (minus) {
Array.from(minus).forEach(function (e) {
e.addEventListener('click', function (event) {
if (parseInt(e.nextElementSibling.value) > event.target.nextElementSibling.getAttribute('min')) {
event.target.nextElementSibling.value--;
if (product) {
Array.from(product).forEach(function (x) {
updateQuantity(event.target);
})
}
}
});
});
}
}