PageSourceSearch

https://www.lagulladaurada.cat/cofree/utils/input-number.js?1780059773

js lagulladaurada.cat collected 2026-09-26 16:53:16 UTC 1,391 bytes, 42 lines download raw bytes

1jQuery(function(){
2  jQuery('input[type=number]:not([no-proccess])').each(function(){
3
4    if (jQuery(this).hasClass("vertical")){
5      jQuery('<div class="quantity-button quantity-down">-</div>').insertBefore($(this));
6      jQuery('<div class="quantity-button quantity-up">+</div>').insertAfter($(this));
7    }
8    else{
9      jQuery('<div class="quantity-nav"><div class="quantity-button quantity-up"></div><div class="quantity-button quantity-down"></div></div>').insertAfter($(this));
10    }
11
12      var spinner = jQuery(this).parent(),
13        input = spinner.find('input[type="number"]'),
14        btnUp = spinner.find('.quantity-up'),
15        btnDown = spinner.find('.quantity-down'),
16        min = input.attr('min'),
17        max = input.attr('max');
18  
19      btnUp.click(function() {
20        var oldValue = parseFloat(input.val());
21        if (oldValue >= max) {
22          var newVal = oldValue;
23        } else {
24          var newVal = oldValue + 1;
25        }
26        spinner.find("input").val(newVal);
27        spinner.find("input").trigger("change");
28      });
29  
30      btnDown.click(function() {
31        var oldValue = parseFloat(input.val());
32        if (oldValue <= min) {
33          var newVal = oldValue;
34        } else {
35          var newVal = oldValue - 1;
36        }
37        spinner.find("input").val(newVal);
38        spinner.find("input").trigger("change");
39      });
40
41  })
42})

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.