PageSourceSearch

https://petsgifts.nl/wp-content/themes/bootscore/woocommerce/js/woocommerce.js?ver=202508111839

js petsgifts.nl collected 2026-09-26 15:41:19 UTC 2,325 bytes, 65 lines download raw bytes

1/**
2 * WooCommerce JS - Bootscore v6.2.0
3 */
4
5
6jQuery(function ($) {
7
8  // Single-product Tabs
9  // First item active
10  $('.wc-tabs .nav-item:first-child a').addClass('active');
11  $('.wc-tab').hide().first().show();
12
13  // Tab switching
14  $('body').on('click', '.wc-tabs li a', function (e) {
15    e.preventDefault();
16
17    var $tab = $(this);
18    var $tabs_wrapper = $tab.closest('.wc-tabs-wrapper, .woocommerce-tabs');
19
20    // Remove active classes and hide all tab panels
21    $tabs_wrapper.find('.wc-tabs li a').removeClass('active');
22    $tabs_wrapper.find('.wc-tab').hide();
23
24    // Activate clicked tab and show corresponding panel
25    $tab.addClass('active');
26    $tabs_wrapper.find($tab.attr('href')).show();
27  });
28  // Single-product Tabs End
29
30  // WC Quantity Input
31  // Quantity "plus" and "minus" buttons
32  $(document.body).on('click', 'form.cart .plus, form.cart .minus,' + // for single product page
33    'form.woocommerce-cart-form .plus, form.woocommerce-cart-form .minus', // legacy cart
34    function () {
35    let $qty = $(this).closest('.quantity').find('.qty'),
36      currentVal = parseFloat($qty.val()),
37      max = parseFloat($qty.attr('max')),
38      min = parseFloat($qty.attr('min')),
39      step = $qty.attr('step');
40
41    // Format values
42    if (!currentVal || currentVal === '' || currentVal === 'NaN') currentVal = 0;
43    if (max === '' || max === 'NaN') max = '';
44    if (min === '' || min === 'NaN') min = 0;
45    if (step === 'any' || step === '' || step === undefined || parseFloat(step) === 'NaN') step = 1;
46
47      // Change the value
48      let newVal = currentVal;
49      if ($(this).is('.plus')) {
50        newVal += parseInt(step);
51        // As the value on page load is always 1 or the min value, the minus button will be disabled by default.
52        // As soon as we add some quantity, we enable the minus button. On further clicks you could go on 0 but
53        // would get notified immediatly by the html validation
54        $(this).closest('.quantity').find('.minus').attr('disabled', false);
55      } else {
56        newVal -= parseInt(step);
57      }
58
59      $qty.val( newVal );
60      $qty[0].reportValidity();
61
62      // needed to enable refresh cart button on legacy cart page
63      $qty.trigger('change');
64  });
65}); // jQuery End

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.