PageSourceSearch

https://www.el-puente.de/static/version1788849077/frontend/Codex/e…odex_QuantityRestrictions/js/qty-buttons.js

js el-puente.de collected 2026-09-26 08:52:35 UTC 1,006 bytes, 30 lines download raw bytes

1require(['jquery'], function ($) {
2    'use strict';
3
4    $(document).on('click', '.js-qty-minus', (event) => {
5        changeInputQtyByQtyButtonAndValue(event.target, -1);
6    });
7
8    $(document).on('click', '.js-qty-plus', (event) => {
9        changeInputQtyByQtyButtonAndValue(event.target, 1);
10    });
11
12    function changeInputQtyByQtyButtonAndValue(qtyButtonElement, value) {
13        let parentControlContainer = $(qtyButtonElement).parents('.control');
14
15        if (parentControlContainer.length > 0) {
16            if (parentControlContainer.length > 1) {
17                parentControlContainer = $(parentControlContainer[0]);
18            }
19
20            let correspondingInput = parentControlContainer.find('input');
21
22            if (correspondingInput.length > 0) {
23                let newValue = parseInt(correspondingInput.val()) + value;
24
25                correspondingInput.val(newValue < 0 ? 0 : newValue);
26                correspondingInput.trigger('change');
27            }
28        }
29    }
30})

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.